I am getting started on Facebook Graph API. I need to use Places Search Product, I have followed a tutorial to create a basic user app (generate user token), and am trying to run this simple request
https://graph.facebook.com/search?
type=place&
center=40.7304,-73.9921&
distance=1000&
q=cafe&
fields=name,checkins,website&
limit=3&
access_token=XXXX
I am always getting this error
{
"error": {
"message": "(#33) This object does not exist or does not support this action",
"type": "OAuthException",
"code": 33,
"fbtrace_id": "XXXXX"
}
}
2
Answers
The answer I found after investigations is that Facebook has deprecated places search from Facebook API, u would need to ask for it to use it!
You did not explicitly specify an API version in your call there, so this uses whatever the default API version for your app is.
Looks like for yours that might be
v6.0
already (did you create the app id only recently?) – and with that, things have changed regarding the Places Search API.There is a new feature called Page Public Metadata Access now, that you have to apply for, before you can use this search.
I tried your request with older apps that still can use lower API versions in Graph API Explorer – and this works fine for API versions
v3.0
up to and includingv5.0
.Using
v6.0
, I get the same error message you mentioned.So, if your app is old enough to still be able to use older API versions, you could do that – at least for the time being. If not, then you will have to submit your app for review of this feature first.