久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Facebook Graph API - 刪除喜歡

Facebook Graph API - delete like(Facebook Graph API - 刪除喜歡)
本文介紹了Facebook Graph API - 刪除喜歡的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在用 PHP 為 Facebook 開發一個應用程序,其中一部分列出了用戶的喜歡".我想在每個贊旁邊添加一個鏈接,以便用戶可以通過刪除他們認為合適的位置來管理他們的贊.

I'm developing an app for Facebook in PHP, part of which lists the user's "likes". I would like to add a link next to each like so that the user can manage their likes by deleting them where they see fit.

Facebook 在他們的圖形 API 文檔中提到了這一點:

Facebook mentions this in their graph api docs:

您可以通過向/POST_ID/likes 發出 DELETE 請求來刪除贊(因為贊沒有 ID).

You can delete a like by issuing a DELETE request to /POST_ID/likes (since likes don't have an ID).

但是每個贊都必須有一個 id——否則你會如何刪除它?

But each like must have an id - how else would you delete it?

以前有人這樣做過嗎?

推薦答案

是的,喜歡在 Graph API 中沒有 ID.您通過向 {item_id}/likes 發布或刪除來喜歡或不喜歡某個項目,其中 {item_id} 被您喜歡/不喜歡的對象的 ID 替換.

Yes, likes don't have an ID in the Graph API. You like or unlike an item by POSTing or DELETEing to {item_id}/likes, where {item_id} is replaced by the ID of the object you're liking/unliking.

要了解當前用戶喜歡什么(以便您可以適當地刪除它們),您可以使用用戶對象的喜歡"連接(文檔).因此,如果您請求 http://graph.facebook.com/me/likes,您將獲得用戶喜歡的頁面/人員/任何內容的列表.(注意:這不包括帖子或照片或類似的東西)

To find out what the current user has liked (so you can delete them appropriately), you can use the "likes" connection of the User object (docs). So, if you request http://graph.facebook.com/me/likes, you'll get a list of pages/people/whatever that a user has liked. (Note: this does not include posts or photos or things like that)

這將返回一個包含如下項目的數據數組:

This will return an array of data full of items like this:

{
     "name": "Very Hungry Caterpillar",
     "category": "Artist",
     "id": "29956247793",
     "created_time": "2009-03-27T15:48:29+0000"
}

里面的ID不是之類的ID.它是用戶點贊過的對象的 ID,所以要取消點贊,必須對 http://graph.facebook.com/29956247793/likes 進行 DELETE.

The ID in there is not the ID of the like. It is the ID of the object that the user has liked, so in order to un-like it, you have to make a DELETE to http://graph.facebook.com/29956247793/likes.

這篇關于Facebook Graph API - 刪除喜歡的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Joining 2 tables in SELECT(MYSQL/PHP)(在 SELECT(MYSQL/PHP) 中加入 2 個表)
How to make lt;option selected=quot;selectedquot;gt; set by MySQL and PHP?(如何使lt;option selected=“selectedgt;由 MySQL 和 PHP 設置?)
Auto populate a select box using an array in PHP(使用 PHP 中的數組自動填充選擇框)
PHP SQL SELECT where like search item with multiple words(PHP SQL SELECT where like search item with multiple words)
json_encode produce JSON_ERROR_UTF8 from MSSQL-SELECT(json_encode 從 MSSQL-SELECT 產生 JSON_ERROR_UTF8)
MySQL ORDER BY rand(), name ASC(MySQL ORDER BY rand(),名稱 ASC)
主站蜘蛛池模板: 日韩欧美一区二区三区在线播放 | 亚洲视频免费播放 | 国产精品国产三级国产aⅴ无密码 | 一区亚洲 | 中文字字幕一区二区三区四区五区 | 亚洲二区精品 | 国产精品久久久久久久久动漫 | 精品欧美一区二区三区 | 精品视频网 | av一区二区三区四区 | 亚洲视频一区在线观看 | 无码日韩精品一区二区免费 | 在线观看第一页 | 亚洲精品久久区二区三区蜜桃臀 | 成人激情视频免费观看 | 国产精品亚洲一区 | 欧美一区二区三区视频在线观看 | 国产情侣激情 | 国产婷婷色综合av蜜臀av | 一级做a爰片性色毛片视频停止 | 欧美成人影院 | 精品视频一区在线 | 日韩av在线中文字幕 | 国家一级黄色片 | 97av视频在线 | 精品一区二区三区不卡 | 国产精品一区二区三区在线播放 | 91精品国产综合久久小仙女图片 | 亚洲视频在线观看 | 色婷婷综合久久久中字幕精品久久 | 国产a爽一区二区久久久 | 午夜在线视频一区二区三区 | 成人黄色av网站 | 日本一区二区视频 | 色伊人网 | 日韩一区二区三区在线播放 | 久久综合久久久 | 久久1区| 精品欧美一区二区三区久久久 | 日本高清不卡视频 | 日韩一区二区三区av |