Eric Lindsey
Eric Lindsey

Reputation: 1102

Facebook Places Search using Client Token

This page claims that you can access the Places Graph functionality without having a logged-in user:

You make your calls using a Client Token (from the client), and an App Access Token (from the server).

The documentation regarding Client Tokens says:

The client token is an identifier that you can embed into native mobile binaries or desktop apps to identify your app. The client token isn't meant to be a secret identifier because it's embedded in apps.

This sounds like exactly what I want--I am trying to build a website that allows users to search for Facebook places. I need to be able to build the list using an AJAX request from the client side.

I can't for the life of me find any documentation on using the Client Token to make such a request.

Please note that I cannot use an App Token because this will be deployed to a website, and Facebook specifically says not to use App Tokens in that context.

I've tried using the Client Token directly as the access_token, but then I get Invalid OAuth access token.

How can I use the Client Token to make a Places Graph API call directly to Facebook's API from the client's browser?

Note: I realize that I could send the request to my own server, then relay that request from my server to Facebook, but that is not an optimal solution for me.

Upvotes: 2

Views: 2724

Answers (1)

blakgeek
blakgeek

Reputation: 419

In case anyone is still struggling with this like I was. You just need to use the appId and client token joined with a pipe. So "appId|clientToken".

Upvotes: 1

Related Questions