Is it possible for two Facebook users using two different Facebook application to get same id
when using graph api? I am asking because id
is app scope based.
To clarify, I am thinking of this Api endpoint:
https://graph.facebook.com/v2.8/me?fields=id&access_token={{access_token}}
For example:
Let’s say that we have two Facebook applications: CatLovers
and DogLovers
, and two Facebook users: Sergey
and Mark
. Sergey
is using CatLovers
application and Mark
is using DogLovers
application.
Can Mark
and Sergey
get same id
for this two requests:
https://graph.facebook.com/v2.8/me?fields=id&access_token={{MARKS_access_token_using_DOGLOVERS_application}}
https://graph.facebook.com/v2.8/me?fields=id&access_token={{SERGEYS_access_token_using_CATLOVERS_application}}
?
3
Answers
Facebook ID is of type numeric string. This is a string that looks like a number. Are you trying to store the id as an int? You should be storing this in a string!
I presume you refer to map users across different apps here? This can be done via the business mapping api: https://developers.facebook.com/docs/apps/for-business
I think you ask, whether ids from two different apps for two different users might be the same; so the possibility to get an id collision when working with two apps.
To answer your question, every Facebook ID for every object/user/page/etc. is unique, even for different apps.
You won’t get any id collisions here.