问题
Okay. I've spent hours poring over the scattered FB documentation concerning xFBML, Open Graph, etc. -- most of it deprecated it seems.
Anyways, I'm trying to get a visitor's Facebook userid (or name or pic or anything) when they visit my site (assuming they are logged into FB already) without them having to "connect" and give my website permission.
It seems that I cannot though. I would just give up, but then I see Yelp. I don't have a Yelp account and I've never given them permission to my FB account. But...if I'm logged into Facebook, and I go to Yelp, they are still able to post my FB photo at the top, they know my FB name, and they're even able to show me which of my friends are on Yelp.
So, does Yelp have some deal with Facebook to get that info without me giving permission?
Or can you really grab some FB info on your "unconnected" visitor?
回答1:
It's a feature called "Instant Personalization", and it's exclusive to a select number of Facebook partners.
From the Facebook FAQ:
We have established a small pilot program with an exclusive set of partners—currently yelp.com, Microsoft Docs.com, and pandora.com—to offer a personalized experience as soon as you visit. These partners have been given access to public information on Facebook (e.g., names, friend lists and interests and likes) to personalize your experience.
So, no, you can't get that information yourself without asking permission from the user, unless you're a participant in the pilot program.
来源:https://stackoverflow.com/questions/3271674/getting-a-visitors-facebook-info-without-app-permission-how-does-yelp-do-i