daily pastebin goal
32%
SHARE
TWEET

fbdata.py

praveenks30 Apr 13th, 2014 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import facebook
  2. import json
  3.  
  4. # Just to format Output
  5. def pp(o):
  6.         print json.dumps(o, indent=2)
  7.  
  8. # This will always be the first step..
  9. # Use your access token
  10.        
  11. g = facebook.GraphAPI('CAACEdEose0cBAP0dEvKUOIE8rOobx3HbKZBoOqM2F9GT9dBeLeFxinbVm3fEfHXpYcsRIIN9635768SSE1hvZAGsokw5FJsBiEgBW2UOjEaeZA40Hk3VvRibUmctjF2FBAoFVZCcPSAIa5RVB1u6ApazwpsqVgKCqWUJDT4etbWDwjzRYascPZAruTqb4pFBhvYeEanhragZDZD')
  12.  
  13. # Search 5 'Hercules' Pages in facebook
  14.  
  15. print'-----------------------------'
  16. pp(g.request('search',{'q':'Hercules', 'type':'Page' ,'limit':5}))
  17.  
  18. # Get some more information about 'Hercules' movie page
  19.  
  20. print '----------------------------'
  21. pp(g.get_object('677574292288637'))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top