How to match oculus user with facebook user - facebook

We're developing a VR game for oculus quest 2. We implemented a file export function to allow the user to export their work to our web server. It works great.
We let users log in to our app with their Oculus IDs (which is their Facebook IDs) so they don't have to create a new user etc.
However, the user has to log in to our web site using their FB id to access their files, and here we have a problem:
We could find no way to match the ID that facebook login for web returns and the ID that oculus entitlement check returns.
So we have a user who logs in with the same facebook user to two different platforms, which gives us different user ID s and different user names.
Anybody has any idea on how to reconcile these two?

Related

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 web app: How to store an ID for user recognition

My company is developing a web app, we are looking to integrate this to Facebook, basically our web app provide some reports. Now some of the clients want to show some information in Facebook. Even though, we dont have any experience developing for Facebook we opened a developer account and we selected build a web-app(We are thinking to embed our web-app in Facebook).
So our question is:
how we could store an ID of our client once he install the app in Facebook?
does Facebook store this ID and every time a visitor in our client's Facebook app enters to the app in Facebook, Facebook sends this ID to our website to recognize which client is it?
Thanks for any inside on it.
Your question is very broad. I would advise to start reading the documentation on Facebook Login to get an idea about how it works.
In general, when an user logs in using Facebook, you will receive an App Scoped User ID. That is an ID that is unique and identifies the user for your app (note: for the same user, each app gets a different ASUID). You can use this ID to keep track of all your users.

How to register an user using Facebook Login?

I have an android app and a web interface for my user to interact with my system. I managed to make the user Login through Facebook LoginButton into my App and now I would like to register it on my own database.
Just to confirm: It is possible to use the same Facebook Application both on the Android App and on the Web, right?
Which user's information(s) should I store on my database so if the user Logins either on my app or my web interface, my system will be able to recognize him? I though about the facebook username, but I was told it may change...
Thanks in advance.
Just to confirm: It is possible to use the same Facebook Application both on the Android App and on the Web, right?
Right. In the Settings tab you can click Add Platform and select the platform where you want to integrate.
Which user's information(s) should I store on my database so if the user Logins either on my app or my web interface, my system will be able to recognize him?
The facebook unique id should be stored in the database. More specifically (considering the recent changes in the API) - app-scoped user id must be stored in the database. This id is unique for a user using an application. So when a user logins to the application using app/web you can recognize him with this id. You can get the user id with : /me API call.
Hope that helps!

Facebook app on localhost: I'm getting different user id

I have a website running on my localhost and I want to test the Facebook integration.
I have created 2 Facebook apps, one for the live site, the other one for the localhost site.
They works both, but when I login to the local app, my returned user id is
10204483432301440
When I login to the live app, my returned user id is
1101244663
The weird thing is that both ids brings me to my facebook page:
https://www.facebook.com/10204483432301440 --> sends me to https://www.facebook.com/francesco.eandi
https://www.facebook.com/1101244663 --> sends me to https://www.facebook.com/francesco.eandi as well!
Is it right? So do we have on facebook different user ids?
https://developers.facebook.com/docs/apps/changelog
App-scoped User IDs: To better protect people's information, when people log into a version of your app that has been upgraded to use Graph API v2.0, Facebook will now issue an app-scoped ID rather than that person's orginal ID. However, for users that have previously logged into your app, the user ID will not change.
Btw, if you need to map user IDs between Apps, this may help you: https://developers.facebook.com/docs/apps/for-business
Although i would not use this for dev/live. you can use "Test Apps" for that: https://developers.facebook.com/docs/apps/test-apps

Facebook access token for userless polling app

I want to write an app that tracks and displays events on specific facebook pages in a special way. The point is that the application will run on displays within environments such as clubs to draw (physical) visitors to the facebook presentation of the club. The normal facebook layout is unsuited for this kind of presentation.
Now I'm troubled by the facebook login api. It seems that only a browser can log in, with a user manually driving the flow.
I need some form of non-interactive login - there won't be any user on the machine the app is running on.
There is the app access token, but for some reason that one is write-only.
I don't want to post any content, my app is read-only.
As far as I'm aware, there are applications such as Spotify, that can interact with facebook without presenting users with browser-driven facebook logins all the time.
So am I overlooking something?