Having Issues trying to scrape Facebook page with Python
<p>I tried this code </p>

<pre><code>import urllib2
import json

def main():
    list_companies = ["walmart", "cisco", "pepsi", "facebook"]
    graph_url = "https://graph.facebook.com/"

    for company in list_companies:
        current_page = graph_url + company

        web_response = urllib2.urlopen(current_page)
        readable_page = web_response.read()
        json_fbpage = json.loads(readable_page)


        print company + " page"
        print json_fbpage["id"]
        print json_fbpage["likes"]
        print json_fbpage["talking_about_count"]
        print json_fbpage["username"]
    print "            "

if __name__ == "__main__":
    main()
</code></pre>

<p>but ended up with this errors</p>

<pre><code>Traceback (most recent call last):
  File "C:\Users\The Blood\Documents\CITAD HATESPEECH SCRAPER\NEW.py", line 24, in &lt;module&gt;
    main()
  File "C:\Users\The Blood\Documents\CITAD HATESPEECH SCRAPER\NEW.py", line 11, in main
    web_response = urllib2.urlopen(current_page)
  File "G:\Python27\lib\urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "G:\Python27\lib\urllib2.py", line 435, in open
    response = meth(req, response)
  File "G:\Python27\lib\urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "G:\Python27\lib\urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "G:\Python27\lib\urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "G:\Python27\lib\urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 400: Bad Request
</code></pre>

<p>I need a head up please.</p>

<p>Thanks</p>