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

Facebook SDK 和 Graph API 評論刪除錯誤

Facebook SDK and Graph API Comment Deleting Error(Facebook SDK 和 Graph API 評論刪除錯誤)
本文介紹了Facebook SDK 和 Graph API 評論刪除錯誤的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

使用 Facebook php SDK 時,考慮到評論的 id 和 xid,我在弄清楚如何刪除評論時遇到了很多麻煩.

Working with the Facebook php SDK's, I am having a lot of trouble figuring out how to delete comments, given its id and xid.

起初我使用的是 REST API,您可以在其中調用 'comments_remove($xid, $id);'刪除評論.當 xid 參數只接受字母數字字符和下劃線時,此方法就會出現問題.基于文檔 (http://developers.facebook.com/docs/reference/fbml/comments ) 一個有效的 XID 可以是任何 url_encode 的結果.

At first I was using the REST API, where you can call 'comments_remove($xid, $id);' to delete a comment. The problem with this method came when the xid parameter only accepts alphanumeric characters and underscores. Based on the documentation (http://developers.facebook.com/docs/reference/fbml/comments ) a valid XID can be the result of any url_encode.

現在我正在使用新的 GRAPH api 測試我的運氣.在刪除對象"下查看 http://developers.facebook.com/docs/api, 看來是肯定支持刪除評論了.但是,我嘗試發送 DELETE 請求,并且還嘗試使用參數method=delete"向對象 url 發送 POST 和 GET.

Now I am testing my luck with the new GRAPH api. Looking at http://developers.facebook.com/docs/api under 'Deleting Objects', It seems that comment deleting is definitely supported. However, I have tried sending a DELETE request, and I have also tried sending POST and GET to the object url with the argument 'method=delete'.

不管我怎么嘗試,我總是得到同樣的錯誤:

No matter how I try it, I always get the same error:

{"error":{"type":"GraphMethodException","message":"不支持的刪除請求."}}

{"error":{"type":"GraphMethodException","message":"Unsupported delete request."}}

我也將訪問令牌作為參數發送.我發送的訪問令牌是從 javascript cookie 上的單點登錄保存在 facebook cookie 中的訪問令牌.這些都是對我的申請的評論.這是否發生在其他人身上,或者我只是做錯了?

I am sending the access token as a parameter as well. The access token that I am sending is the access token saved in the facebook cookie from the single sign on javascript cookie. These are all comments made on my application. Does this happen to anyone else, or am I simply not doing this right?

非常感謝任何幫助或指導.

Any help or guidance is GREATLY appreciated.

推薦答案

已修復!

刪除時必須在對象 ID 前面加上用戶 ID:

You have to prepend the userid to the object ID when deleting:

刪除https://graph.facebook.com/673509687_104812882909249?access_token?access_token}在哪里673509687 是我的用戶 ID,104812882909249 是對象 ID

DELETE https://graph.facebook.com/673509687_104812882909249?access_token={access_token} where 673509687 is my userID and 104812882909249 is the objectID

這篇關于Facebook SDK 和 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)
主站蜘蛛池模板: 欧美国产日韩在线 | 99久久免费观看 | 久久国产成人精品国产成人亚洲 | aaaaaaa片毛片免费观看 | 国产视频久久 | 99re在线| 欧美日韩中文在线 | 一区二区三区精品视频 | 中文字幕一区二区三区日韩精品 | 天天插天天操 | 成人欧美一区二区三区在线播放 | 91久久精品日日躁夜夜躁国产 | 成人av在线播放 | 韩日一区二区三区 | 国产成人综合网 | 色www精品视频在线观看 | 免费在线观看av网站 | 午夜丁香视频在线观看 | 81精品国产乱码久久久久久 | 国产一区999 | 91精品国产综合久久精品 | 亚洲成av| 操夜夜| 日韩精品人成在线播放 | 免费成人av | 一区二区视频在线观看 | 国产在线一区二 | 亚州影院 | 天天综合日日夜夜 | 国产美女精品 | 久久一 | 国产一区二区电影 | 欲色av| 一区二区在线看 | 国产91在线播放 | 狠狠狠 | 精品久久99 | 亚洲一区二区视频 | 一级二级三级在线观看 | 91精品国产乱码久久久久久久 | 97视频网站 |