Reputation: 510
I have Facebook login/sign up. So I am keeping the Facebook ID during signup and compare the same during login using Facebook. But will the Facebook Id be unique for every sessions of the same user?
Also, is there a way to get the login and user profile data (including user picture) in a single api (ie.get in the login request itself)?
Upvotes: 0
Views: 244
Reputation: 31479
Please look at the docs:
User access tokens come in two forms: short-lived tokens and long-lived tokens. Short-lived tokens usually have a lifetime of about an hour or two, while long-lived tokens usually have a lifetime of about 60 days. You should not depend on these lifetimes remaining the same - the lifetime may change without warning or expire early.
and
Facebook will begin to issue app-scoped user IDs when people first log into an instance of an app that has been upgraded to API v2.0 or above. Previously, a user was known by the same ID across every app. With app-scoped IDs, the ID for the same user will be different between apps. This makes it harder for a user's data to be passed between apps, which helps protect people's information. For people who have already logged into an app, their ID will not change.
And no, it's not possible to get user info in one step with the login process. The user has to give his permissions first.
Upvotes: 2