I am startingto learn facepy and when I tried to post from facepy, I get an error. But I can get post details. My code:
>>> from facepy import GraphAPI
>>>g = GraphAPI('my_token')
>>> g.get(506482556089521)['from']
{u'name': u'Aswin Murugesh', u'id': u'100001833444044'}
>>> g.post(
... path = 'me/posts',
... message = 'Hello'
... )
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
File "/usr/local/lib/python2.7/dist-packages/facepy/graph_api.py", line 65, in post
retry = retry
File "/usr/local/lib/python2.7/dist-packages/facepy/graph_api.py", line 237, in _query
return load(method, url, data)[0]
File "/usr/local/lib/python2.7/dist-packages/facepy/graph_api.py", line 201, in load
result = self._parse(response.content)
File "/usr/local/lib/python2.7/dist-packages/facepy/graph_api.py", line 279, in _parse
error.get('code', None)
facepy.exceptions.FacebookError
Why do I get this error?
Because you not post message that response from facebook
What I see that you miss is
You use incorrect path. If you debug the error you will got
The correct path to post a message to your wall is
me/feedYou can test it here https://developers.facebook.com/tools/explorer/?method=POST&path=me%2FfeedIf it still get the error, your problem might be not have
publish_streampermissionFor more information : https://developers.facebook.com/docs/reference/api/publishing/