After a user connects with Facebook, Facebook responds with an access_token
.
Can I assume this access_token
will always stay the same and is unique for every user?
If so, then I can use it to find the user in my database, and if not found, create a new user.
If not, is there a way to ask Facebook to also send you back user_id
(with the access_token
) right after connecting so that I don't have to make another request to /me?fields=id
for it?
You should use their id
as a unique identifier. The access_token
is unique, but you'll get a new one every time you request one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With