Skip to content

Instantly share code, notes, and snippets.

@fmasanori
Created November 20, 2012 22:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save fmasanori/4121690 to your computer and use it in GitHub Desktop.
Save fmasanori/4121690 to your computer and use it in GitHub Desktop.
Python Graph Facebook basic
import urllib
import json
url = 'https://graph.facebook.com/19292868552'
resp = urllib.urlopen(url).read()
data = json.loads(resp)
url_logo = data['cover']['source']
imagem = urllib.urlopen(url_logo).read()
f = open('logo.jpg', 'wb')
f.write(imagem)
f.close()
print ('Logo gravado em logo.jpg')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment