Reputation: 1
I was wondering if its possible to get LOGGEDin facebook user_id once they visit my website, without click on any login or fb.connect or even using API ? can we get facebook logged user_id ?.. cheers
Upvotes: 0
Views: 1222
Reputation: 2131
You seem to be confused, let me try to clear a few things up.
When you say "without the API" what you seem to mean is "without them giving permission." Even if you don't use "The API", you'll still be required to get permissions before you're able to get access to their account data using your access token.
If you're looking for ways to have Facebook stuff on the page that doesn't require authentication, try Facebook's Social Plugins: https://developers.facebook.com/docs/plugins/ Basically, they run inside of a Facebook , so the user is interacting with a Facebook widget on your page, but your server doesn't get any access to their data.
Upvotes: 0
Reputation: 1805
You can not get the logged in facebook user_id without using the API because it not only violates the browser's security, but also Facebook's (not to mention the user's privacy).
Upvotes: 2
Reputation: 12721
Yes, you can use the javascript API. Use the FB.getLoginStatus function. If they are logged in, the session will contain their user ID.
Upvotes: 0