Reputation: 525
I am working with Python and I have installed the Python SDK so I can work with Facebook Open Graph:
pip install facebook-sdk
Then I created this simple file with the below code:
import facebook
ACCESS_TOKEN = '<MY APP ACCESS TOKEN OBTAINED FROM https://developers.facebook.com/tools/access_token/>'
graph = facebook.GraphAPI(ACCESS_TOKEN)
inf = graph.request('search', args={'q': 'bingo', 'type': 'application'})
The problem is that I am getting this error:
GraphAPIError: (#200) Must have a valid access_token to access this endpoint
when searching for an application like on the last line of code above, and I can't figure out why. Note that when I run code like:
inf = graph.request('search', args={'q': 'bingo', 'type': 'page'})
print inf
... everything works fine. i.e: Searching for a page with keyword bingo works fine, but searching for an application with keyword bingo fails.
Does anyone know how to solve this or why it is happening?
Upvotes: 0
Views: 521
Reputation: 83
The following changes will go into effect on July 10, 2013:
Graph API search changes
App access tokens will be required for all search Graph API calls except Places and Pages. Search for application will no longer be supported.
Upvotes: 3