Answer the question
In order to leave comments, you need to log in
How to do search for places in Facebook Graph API using python?
Good afternoon! The second day I read the docks on the FB Graph API and I can’t find the answer to the question - is it possible to use Python to search for places on a given request? My example - I need to find, say, restaurants in Lyon (preferably get their name, address, rating (number of stars), number of likes ...). I made this script:
import facebook
graph = facebook.GraphAPI(access_token='my_token', version='2.9')
app_id = 'my_app_id'
places = graph.request('search', args={'q': 'restaurants in Lyon', 'type': 'place'})
for i in places['data']:
print(i['name'], i['id'])
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question