Вопрос

Need a way to post a comment on a friend's wall post through the Facebook API (I'm using the Python wrapper).

Consider two users, Alice and Bob. I have read_stream and write_stream permissions for both users.

>>> 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

Interestingly, this only happens when Alice's wall post has an attachment. It does not happen if Alice makes a wall post with no attachment, just a message.

I'm totally confused as to how the permissions could be any different between wall posts with attachments and wall posts without them.

Anyone know what I'm doing wrong?

Это было полезно?

Решение

This ended up only happening with Alice -- with other users Bob was able to comment on their wall posts. I'm chalking it up to Alice having weird Facebook privacy settings.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top