I'm trying to use Facepy, a sort of API for Facebook and Python, to simply post an image from my desktop to a Facebook page for which I have the authorization code and publish_stream and upload_photo permissions. (UPDATE: how do I verify that that is true?)
It's not working for me, though it is working for the author of Facepy. I'm at a loss for what is causing the issue. When I run this code, taken from the Facepy site (and using a .jpg on my computer):
UPDATE: This is the entirety of the code I am running:
from facepy import GraphAPI
print 'Trying Facebook page...'
my_token = 'xxxxxxxxxxxxxxxxx'
graph = GraphAPI(my_token)
# Get my latest posts
my_posts = graph.get("me/posts")
#Post a photo of a parrot
graph.post(path = "me/photos",source = open("python.png"))
print 'Done.'
Facepy returns this error:
Error: (#1) An unknown error occurred
I have tried it, unsuccessfully, with Python 2.5 and Python 2.7 on WinXP. Facepy can, however, get my latest posts, with graph.get('me/posts')
Any advice to get this to work would be appreciated.