Comment SDK API and graphics on Facebook. Uninstall error.

When working with the PHP SDK for PHP, I had problems with how to remove comments, given its identifier and xid.

First I used 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 accepts only 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.

Now I am testing my luck with the new api. Looking at http://developers.facebook.com/docs/api in the "Removing Objects" section, it seems that deleting comments is definitely supported. However, I tried sending a DELETE request, and I also tried sending POST and GET to the object URL with the argument 'method = delete'.

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

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

I am sending an access token as a parameter. The access token I'm sending is an access token stored in a facebook cookie, from a single character in a javascript cookie. All these comments are made in my application. Does this happen to someone else, or am I just not doing it right?

Any help or guidance is POSSIBLE highly appreciated.

+1
php facebook facebook-graph-api
source share
3 answers

Fixed!

When deleting an object identifier, you must add the object identifier:

DELETE https://graph.facebook.com/673509687_104812882909249?access_token= {access_token} where 673509687 is my user ID and 104812882909249 is an object identifier

+1
source share

Try the following:

FB.api ('/' + _ idComment, 'get', {method: 'delete'}, function (response) {// Your code}

0
source share

All Articles