Johann Gomes
Johann Gomes

Reputation: 4163

Multiple Facebook IDs for the same user

i'm crawling user comments and its user ids in public links to build a graph, and i noticed some users have more than one ID. For example, this user have two different IDs: 100000571429851 and 993673107328394.

I'm not using different aps to get the user ids (someone told me user IDs changes between different apps).

Any ideas about how i can get a really unique ID for each user?

Upvotes: 14

Views: 7118

Answers (1)

Neil
Neil

Reputation: 1066

The reason for the different IDs is because this user is using a mixture of v1 and v2 facebook apps. The first ID is the user's personal ID and is returned when someone authorizes the v1 of an app. The second ID is an app scoped-ID and is returned using v2 of the facebook API. See the section in the facebook docs on App-scoped User IDs

https://developers.facebook.com/docs/apps/upgrading

Facebook will begin to issue app-scoped user IDs when people first log into an instance of your app coded against v2.0 of the API. With app-scoped IDs, the ID for the same user will be different between apps.

Upvotes: 13

Related Questions