Facebook API - 在朋友的墙上发帖评论

时间:2013-01-14 18:04:51

标签: facebook facebook-graph-api facebook-comments facebook-wall

需要一种方法通过Facebook API在朋友的墙上发布评论(我正在使用Python包装器)。

考虑两个用户,Alice和Bob。我对两个用户都有read_stream和write_stream权限。

>>> alice_graph = GraphAPI(alice_access_token)
>>> bob_graph = GraphAPI(bob_access_token)

# Alice makes a post on her own wall, which returns the objects Graph API id
>>> alice_graph.put_wall_post("test_message", attachment={'name' : 'some_name', 'link' : 'some_link')
{u'id': u'some_facebook_id'}

# Alice can comment
>>> alice_graph.put_comment('some_facebook_id', "test comment")
{u'id': u'some_other_facebook_id'}

# But Bob cannot comment
>>> bob_graph.put_comment('some_facebook_id', "test_comment")
*** GraphAPIError: (#100) Error finding the requested story

有趣的是,这个只发生在Alice的墙贴有attachment的情况下。如果Alice发布没有附件的墙贴,只是一条消息,就不会发生这种情况。

对于带有附件的墙贴和没有附件的墙贴的权限如何,我完全感到困惑。

任何人都知道我做错了什么?

0 个答案:

没有答案
相关问题