title: facebook page info using Graph Api 2.2
body: <p>I have unique ID of 1000 facebook pages inside a google spreadsheet . I want to crawl all the pages to get their info (Likes, email etc) what should i do? Also i cannot run the search query in my browser and where to run a script. Plz be as detailed as possible. Thank u :)</p>
  
  <p>I tried to make a python script for this but it works for 1st entry only.</p>
  
  <pre><code>import urllib as url2
  import json
  
  
  f=open('ids.txt')
  for i in f:
          url="http://graph.facebook.com/"+str(int(i))+"?fields=likes"
          data = url2.urlopen(url).read()
          print data
          data2=json.loads(data)
          print "number of likes on page with id "+str(data2["id"])+" has "+str(data2["likes"])+" likes !"
  
  f.close()
  </code></pre>
  
  <p>The ids.txt file contains id of facebook pages.</p>
  
  <pre><code>1 493343230696447
  2 1767379894975
  3 122116091270024
  4 545044065615713
  </code></pre>