Facebook app - Test User ID changes after user first logins the app

561 views Asked by At

I'm building an app that allows user to search for other Facebook users (using the search node on the Graph API that looks something like: search?q=T&type=user&limit=10 for users starting with T) and perform a certain 'pending' operation on those users, so when those users first connect to my app they will know someone performed a certain 'pending' operation on them.

Now, when those users first logs in my app their ID changes (at least for the Test users). If this would happen to normal users as well this will pretty much not allow me to identify the users which had 'pending' operations on them.

If so, how can identify users without them logging in if their ID changes after login?

Final Answer: I have opened a Facebook bug about it: https://developers.facebook.com/bugs/1531594233745476

It seems like the ID's on the search API are not scoped for the app and are just global ID's until the user logins my app (which will eventually change his ID to the scoped one) this means that there is no option to detect scoped user and non scoped one. I think that the search node for users is really useless then.

1

There are 1 answers

1
Simon Cross On

If you call /v2.0/search?q=T&type=user, the IDs returned will be the same as when the user logs into your app - as long as your app invokes the login dialog also using v2.0 in the URL.

In v2.x, a person's ID is always consistent. However, if parts of your app are calling v1.0 and others calling v2.x, a person's ID will change unless they have logged into your app, in which case it will be the same between both versions.

If you're using Test Apps, the IDs between your production and test app should match - the exception is where the same user logged into the prod app using v1 and the test app using v2.

The simplest way to remove this inconsistency is to convert all your API calls across your prod app and all Test Apps to call v2.x.