Facebook app scoped user id's temporary - facebook

I want to see who is going to a Facebook event, so I use the API to get the attendees. The users I get have an app scoped user id.
But here is the thing: sometimes the same user gets a different App Scoped User Id. So for example, the user John Doe first has an app scoped user id of 1000000, and a week later it is 2000000.
I get redirected to the same John Doe profile when I visit these urls:
facebook.com/app_scoped_user_id/1000000
facebook.com/app_scoped_user_id/2000000
Are these app scoped user ids temporary ids?
Edit:
This is the API call I use to get the event attendees:
https://graph.facebook.com/v2.3/EVENT_ID_HERE/attending?access_token=app_id|app_secret

App Scoped IDs are definitely not temporary if the user authorized your App. If the same user gets a different App Scoped ID, then i assume it´s because he is did NOT authorize your App. It makes sense, because non-authorized users should not be stored. If you think that this is a bug, you should file a report here: https://developers.facebook.com/bugs/

Related

How to check if Facebook user is the App Admin

Using Facebook API for FB Login, how is possible to know if the user who authorized my application is the application's admin (owner)?
The old days FB return the real FB user id, so it was easy to compare it. Now it returns a number which is not the real FB profile id.
Thank you
The old days FB return the real FB user id, so it was easy to compare it. Now it returns a number which is not the real FB profile id.
That’s called app-scoped user id.
You will have to use that one to identify users within your app. So you need to get your admin user’s app-scoped id once after logging in as that user, and store it somewhere for future comparison.
There is also the /{app-id}/roles endpoint, which you can use to query which users have which role in your app. But that uses app-scoped user ids as well.
If you have multiple apps connected to a business, you can also use the User Ids For Apps endpoint to be able to match app-scoped user ids across different apps. (You will still have to use the app-scoped id for one of your “main” apps to compare against though; the global user id is not available at all any more via API / to 3rd-party apps.)

Facebook login for web and device generate different uid for same user

We are trying to update Facebook login for a device and found out different uid generated while login via PC browser and device login method. The uid generated by browser can get user feeds, but it return empty for uid generated by device login. Does anyone know why there is different uid for same user?
It's by design so that unrelated apps can't correlate their users.
Straight from the upgrade docs, emphasis mine;
App-scoped User IDs
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.
No matter what version they originally used to sign up for your app, the ID will remain the same for people who have already logged into your app. This change is backwards-compatible for anyone who has logged into your app at any point in the past.
If you're not mapping IDs across apps, then no code changes should be required. If you need to map the same user IDs across multiple apps or run cross-app promotions, we've added a new API called the Business Mapping API. This lets you map a logged-in user's IDs across apps as long as those apps are all owned by the same business.

Facebook friends - Will my friend(who was retrieved with lower api version of me/friends) get app scoped user id if he/she connects my app with 2.x?

We had fetched friend's data prior april changes of facebook, where me/friends returned the actual user ids of all of my friends. Even today if I query for my id it would return me the actual user id and not the app scoped id as I was previously connected to the app.
My question is if my friend connects this app today. Will he be getting the new app scoped id or the actual fb user id as previously received in my friendlist?
Whether you get an app scoped user id, or the global one, depends on when the user logged in to your app for the first time. If that was after API v2 was introduced, then you get their app-scoped user id.
You can not figure out if a new user that logs in to your app for the first time now (and will get an app-scoped user id) is identical to a user whose global id you got long time ago by reading someone’s friend list.
Your app will only be able to “see” friends of the current user now, if they are users of the app as well, and have granted user_friends permission as well.

Facebook oauth unified scoped id across apps in same business

I have two facebook apps in the same business.
I want to get same scoped ids for both apps when users are logging in (because I use the same database).
I've read the facebook upgrade guide, but I don't get how to use the token_for_business to get same id when the user is logged.
Graph api returns different tokens for business for every app (which is strange).
The only useful thing so far is the /me/ids_for_business call to get list of the user scoped IDs for every busines..but it only returns them if they were logged at least 1 time..
My second app is new and if user logs in to it (without logging in to the first app) I can't get his first app ID to store and use it.
Thanks
There will always be differend app-scoped user ids per app. That's the whole purpose of them.
Have you followed the steps at
https://developers.facebook.com/docs/apps/business-manager#create-business and/or
https://developers.facebook.com/docs/apps/business-manager#update-business
If so, according to the docs, the field token_for_business of the user should contain
A token that is the same across a business's apps. Access to this token requires that the person be logged into your app. This token will change if the business owning the app changes

Detecting a Facebook user is an admin: app scoped ids

Since the introduction of Graph v2.0, apps are now granted app scoped ids instead of users' real profile ids. What this means is that if I run FB.getLoginStatus, the user id of the logged in user is now the app scoped id rather than the main one.
However, what if I want to work out if a user is an admin of my app? I need to use an app token, and query app/roles. However, the id returned here in the admins section is the actual profile id of the user, not the app scoped id.
My question is - is it even possible to work out if a user is an admin of an app anymore?