图谱API - 发表评论似乎没问题,但没有添加新评论

时间:2015-08-05 15:09:25

标签: android facebook

我几天前刚刚使用过Graph API并且在评论中苦苦挣扎。 我可以使用以下链接检索所有评论:

http://graph.facebook.com/comments/?ids=http://example.com/my_post_here

它按预期返回所有注释。现在很酷。 :)

然后我尝试使用facebook sdk发布评论到该帖子(调用directlt到链接不起作用。:()

发布评论的代码(在使用授予的publish_actions权限进行登录后)

Bundle bundle = new Bundle();
bundle.putString("message", comment);
String grapPath = "http://example.com/my_post_here/comments";
new GraphRequest(AccessToken.getCurrentAccessToken(),
                graphLink,
                bundle,
                HttpMethod.POST,
                new GraphRequest.Callback() {
                    public void onCompleted(GraphResponse response) {
                        /* handle the result */
                        Log.e(TAG, "Graph resp:" +     response.getRawResponse());
                    }
                }
).executeAsync();

我可以看到onCompleted回调被调用,原始响应如下所示:

{"id":"738551662920009","url":"http://example.com/my_post_here/comments"}

起初我认为评论是成功发布的,但事实并非如此。我在帖子上看不到任何新的评论,这让我对上面的Graph响应意味着什么感到困惑。我错过了什么吗?

由于

0 个答案:

没有答案