Skip to content

Instantly share code, notes, and snippets.

@diezguerra
Created October 4, 2013 23:10
Show Gist options
  • Save diezguerra/6834359 to your computer and use it in GitHub Desktop.
Save diezguerra/6834359 to your computer and use it in GitHub Desktop.
import requests
import json
r = requests.get('https://graph.facebook.com/search?q=&type=adcountry&limit=500')
countries = {country['name']: country['country_code'] for country in r.json()['data']}
assert countries['Spain'] == 'ES'
assert len(countries) == 216
@jsrawan-mobo
Copy link

This should be in fbgraphlib.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment