Adham Adham - 2 years ago 169
Python Question

Post picture to Facebook using Python

How can I post an image to Facebook using Python?

Answer Source

You can use the facebook provided Python SDK to upload photos using an oauth key.
Once you get the oauth key, you can upload a picture with GraphAPI.put_object():

graph = facebook.GraphAPI(oauth_access_token)
photo = open("picture.jpg", "rb")
graph.put_object("me", "photos", message="You can put a caption here",
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download