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.
php facebook facebook-graph-api
Michael
source share