Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import facebook
- import json
- # Just to format Output
- def pp(o):
- print json.dumps(o, indent=2)
- # This will always be the first step..
- # Use your access token
- g = facebook.GraphAPI('CAACEdEose0cBAP0dEvKUOIE8rOobx3HbKZBoOqM2F9GT9dBeLeFxinbVm3fEfHXpYcsRIIN9635768SSE1hvZAGsokw5FJsBiEgBW2UOjEaeZA40Hk3VvRibUmctjF2FBAoFVZCcPSAIa5RVB1u6ApazwpsqVgKCqWUJDT4etbWDwjzRYascPZAruTqb4pFBhvYeEanhragZDZD')
- # Search 5 'Hercules' Pages in facebook
- print'-----------------------------'
- pp(g.request('search',{'q':'Hercules', 'type':'Page' ,'limit':5}))
- # Get some more information about 'Hercules' movie page
- print '----------------------------'
- pp(g.get_object('677574292288637'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement