Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do Facebook places search without user facebook authorize

I am still new to Facebook Graph API, and trying to start using facebook places search. (search places by location)

https://graph.facebook.com/search?type=place&center=37.76,122.427&distance=1000

One thing i have noticed is user have to login to their Facebook account to do the search, otherwise the search will be rejected.

Could anyone shine me some light pointing a direction to work around this? Any links or articles will be appreciated.

Thank you

like image 799
D.J Avatar asked Nov 11 '10 00:11

D.J


People also ask

What can I do with Facebook API?

The Graph API is the primary way to get data into and out of the Facebook platform. It's an HTTP-based API that apps can use to programmatically query data, post new stories, manage ads, upload photos, and perform a wide variety of other tasks.

What is access token in Facebook?

An access token is an opaque string that identifies a user, app, or Page and can be used by the app to make graph API calls. When someone connects with an app using Facebook Login and approves the request for permissions, the app obtains an access token that provides temporary, secure access to Facebook APIs.


2 Answers

Yeah, unfortunately I think this is a design flaw (or feature?). By this design, only Facebook authentication users can search for places. Others cannot. It seems more like a capability designed to serve end users than actual apps.

The flaw I see is that many applications out there are trying to offer optional Facebook integration but don't make it obligatory. Unfortunately, as it stands now, the places API can't be used as a service for apps just additional functionality for FB users.

like image 173
pschang Avatar answered Oct 05 '22 10:10

pschang


What you are trying to do is not possible. Per the error message: "An access token is required to request this resource." Most of the graph api requires an authenticated user (ie an access token) to make requests. There are only a few calls that can be made without the access token and this is not one of them.

like image 24
Nathan Totten Avatar answered Oct 05 '22 10:10

Nathan Totten