问题描述
我开始研究这个,因为我想能够删除Facebook活动墙上的评论,因为删除帖子似乎不适用于事件墙上的评论。不过,由于我不知道是否有可能,我决定看看我是否可以自己删除一个我自己的墙壁上的帖子,因为这是可能的。注意我使用任何SDK 不我正在构建URL并在Firefox v3.6.17中的地址栏中输入。
自从我开始以来,这些帖子帮助了我很多:
和
我可以通过以下内容查看评论数据及其所有字段:
https://graph.facebook.com/ [POST_ID]?access_token = [ACCESS_TOKEN]
`其中[POST_ID]和[ACCESS_TOKEN]使用图形API。
但是,我在哪里将method = delete命令放在URL中?我试着把它放在最后,像
https://graph.facebook.com/ [POST_ID]?access_token = [ ACCESS_TOKEN]?method = delete
但是导致OAuthException表示访问令牌签名无效,因为它似乎读取方法作为访问令牌的一部分。
我尝试将其放在post_id之后,如
https://graph.facebook.com/ [POST_ID}?method = delete?access_token = [ACCESS_TOKEN]
,但会导致异常(不支持的方法),因为它认为access_token = [ACCESS_TOKEN]是被调用方法的一部分。
我看到上面引用的一个帖子状态我必须使用
DELETE https://graph.facebook.com/673509687_104812882909249?access_token={access_token}
`其中673509687是我的userID,104812882909249是objectID`
但是当我输入
DELETE https://graph.facebook.com/ [POST_ID}?access_token = [ACCESS_TOKEN]
在Firefox地址栏中它无法识别(我不认为它会反正),并将其用作谷歌搜索查询。
如果我有comment_id和我的access_token使用网页,我该如何删除评论浏览器?
您的网址有一个很大的问题:
https://graph.facebook.com/ [POST_ID]?access_token = [ACCESS_TOKEN]?method = delete
https://graph.facebook.com/ [ POST_ID]?access_token = [ACCESS_TOKEN]&方法=删除
同样地,
https://graph.facebook.com/ [POST_ID}?method = delete?access_token = [ACCESS_TOKEN]
应该是:
https://graph.facebook.com/ [POST_ID} ?method = delete& access_token = [ACCESS_TOKEN]
所以你必须在输入之前使用?您的参数,然后每个参数和订单之间的& 不应该有任何重要性。
I started researching this because I wanted to be able to delete a comment on the wall of a Facebook Event, because the "Remove post" doesn't seem to be applicable to comments on an Event wall. However, since I don't know if it is even possible I decided to see if I could mannually delete a post I made to my own wall first since that is possible. Note I am NOT using any SDK; I am just building the URL and entering it in the address bar in Firefox v3.6.17.
These posts have helped me alot since I am now starting:Delete facebook post with Graph API - trouble getting this to work andFacebook SDK and Graph API Comment Deleting Error
I can see the comment data and all its field via the following:
https://graph.facebook.com/[POST_ID]?access_token=[ACCESS_TOKEN] `where [POST_ID] and [ACCESS_TOKEN] were got using the graph API.`
However, where do I put the "method=delete" command in the URL? I tried putting it at the end, like
https://graph.facebook.com/[POST_ID]?access_token=[ACCESS_TOKEN]?method=delete
but that results in a OAuthException stating "Invalid access token signature" because it seems to read the method as part of the access token.
I tried putting it after the post_id like
https://graph.facebook.com/[POST_ID}?method=delete?access_token=[ACCESS_TOKEN]
but that results in an Exception (Unsupported method) because it thinks "access_token=[ACCESS_TOKEN]" is part of the method being called.
I see one of the posts cited above states I have to prepend the userid to the object ID when deleting by using
DELETE https://graph.facebook.com/673509687_104812882909249?access_token={access_token} `where 673509687 is my userID and 104812882909249 is the objectID`
But when I enter
DELETE https://graph.facebook.com/[POST_ID}?access_token=[ACCESS_TOKEN]
in the Firefox address bar it doesn't recognize it (I didn't think it would anyway) and uses it as a google search query.
How do I delete a comment if I have the comment_id and my access_token using the web browser?
解决方案You have a big problem with your urls :
https://graph.facebook.com/[POST_ID]?access_token=[ACCESS_TOKEN]?method=delete
Should be :
https://graph.facebook.com/[POST_ID]?access_token=[ACCESS_TOKEN] & method=delete
Identically,
https://graph.facebook.com/[POST_ID}?method=delete?access_token=[ACCESS_TOKEN]
should be :
https://graph.facebook.com/[POST_ID}?method=delete & access_token=[ACCESS_TOKEN]
So you have to use the ? before entering your parameters and then & between each parameter and the order should not have any importance ..
这篇关于如何使用Facebook GRAPH API删除Facebook评论文章?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!