Li Haoyi
Li Haoyi

Reputation: 15802

Facebook Access Token questions

I'm playing around with Facebook Connect, trying to use Facebook as the means or authentication on my site. Currently my workflow looks something like this:

So I have a few questions:

Upvotes: 0

Views: 1946

Answers (2)

Igy
Igy

Reputation: 43816

Why don't you just use the Facebook Javascript SDK to detect if they're currently logged into Facebook? This will also make the access token available in Javascript so you can make client-side calls to the API. You can access the same access token server side via the session cookie set by Facebook also.

Upvotes: 2

Pat James
Pat James

Reputation: 4348

I can't answer all of your questions but I can tell you that having the access token in a hidden field on your page is risky from a policy perspective, especially if your page can be read by any third-party code such as Google Analytics or AdSense. Facebook will nail you for this as it is leaking user identifying data to third parties. The Facebook userid is in the access token in plain text. Facebook has automated processes that scan for this stuff and will auto-ban your app if it is leaking userids to third parties.

Upvotes: 2

Related Questions