How to access Game state on Google Cloud with Facebook ID? - facebook

I am trying to access game state from Google server of a Facebook friend. I fetch the List of Facebook friends from Facebook SDK and get a Facebook-id of a friend in return. Game state is present on Google server against Google-id. How can I form a mapping between these two? I want to achieve this without involving any other server.

To dTo get this right you need involving other server.
Although you can do is create a list in a local file, with the relation google user - Id facebook

Related

facebook application for login and messenger same ids?

I am building a facebook messenger bot. And the bot is giving user ids. But it is not clear to me if the messenger ids are the same ids that would be returned if I use the same app and add to it a login feature. Because we already have an app and has a login feature, now we need to build a facebook bot and identify the already existing users in our db that are using the bot.
I have read facebook tutorial about linking 2 different applications to the same business to get consistent ids. But what if I use that same application to login users AND for messengers (by using the add products to the application, and so having one application, one app id) would that work? Would I be getting the same user ids?
PS: I would test myself but I am in an awkward position where the page/database/login app owner is a different person, and they are not big on sharing data, and I am supposed to blindly write a messenger code that is supposed to work when they deploy it.
All help is appreciated, thank you.
You need to use Facebook's ID Matching APIs for this purpose:
Here is the details: https://developers.facebook.com/docs/messenger-platform/identity/id-matching

Using FaceBook Sdk in my Unity Game (Login and User's FB_id)

I've been working with integration of Facebook sdk in my unity game. In the first page I kept a fb login option and I'm trying to fetch the player's fb_id(with which I will be making an online leaderboard). I'am facing two problems.They are:
Only my apps developers, test-users and owner(me) can login only first time. If i clear my apps data I face a hash key validation problem. There will be a screenshot below.
I need the fb_ids of all users . But I am getting only the fb_ids of people who has roles (owner, developer and test users) . How can I get the fb_ids of all users?
NB: My game is published in google play and reviewed by Facebook with necessary permissions.
Google Play Link: https://play.google.com/store/apps/details?id=com.BLI.CatchTheBaby&hl=en
Facebook SDK does not allow you to get data of all users.
Their API returns only your friends ids,name etc. Here is an online tester of Graph API: https://developers.facebook.com/tools/explorer/
If you want to get all users FB IDs you have to store them on your online database like this: When user is doing his first login to Facebook from your app, you are sending returned id to database by some kind of webrequest. Then you can fetch data with all users IDs.

Get all the facebook Application user details

Am a facebook game developer. i have developed a game and am using facebook log in facility.but still now i want store the my app user id in my database.
but am interested do Rank the user based on their score. hence i need there all the user of my game.
so it any possibility to get the all registered user ID from Graph API/ or in any other way?
when the user is registering your app or authorizing it, store the user details in your own table. That would be a better option. Or you have to use FQL on insights object to get the application installed users.
https://developers.facebook.com/docs/graph-api/reference/insights
There you have a property called "application_installed_users"

How to find out which of your facebook friends are also using your mobile app?

We are building mobile app that uses Facebook for registration (know how to do this).
We would like to have a screen, where all your friends would be listed with indication, if they also use our app.
How should we save data (client, server) that one facebook user is also our app user?
When you're already using Facebook for authentication, you probably already have a column in the user table in your database that holds Facebook profile ids of each user. If you want to distinguish between them, just add a column modeling if that user is also using your mobile app.
By issuing a request to https://graph.facebook.com/PROFILE_ID/friends as described in the Facebook Graph API Documentation you can get the list of friends for a certain user without requiring any additional permissions.
Now just build the intersection between the friends list of the user and your (mobile app) user base and you got the list of his friends that are using your mobile app. You should of course do this comparision on the server, so you don't have to send the Facebook ids of your complete user base around.

How to architect and design Facebook friends integration into a iPhone app with cloud service

For some reason I can't find this information anywhere. I'm looking to figure out best practices for how to design and architect Facebook integration into an iPhone app that also has a cloud service backing it for my own (non-facebook) data.
Specifically, assume a user is going to authorize Facebook access in my iPhone app and I want to find "your Facebook friends that are also using this app+service".
The Facebook authentication and authorization with iOS SDK is straightforward, and it looks obvious that my service needs to store the user's Facebook User ID. However, I am trying to get clarity on:
Who does the friend lookup against Facebook's server? iPhone client or my service?
Does my service cache anything about the relationship between the friends or is it looked up each time?
I'm ultimately trying to figure out how to get a design that will scale to millions of users and see problems in whether client or the server does the work. If it's the client, then user has to wait for a call to FB OpenGraph, then back to my cloud service to get the intersection of FB friends using my service (+ any other metadata I want to show).
If it's my server, I'm caching information that ultimately has to be sync'd and reconciled with changes to the user's friends list. Also, this doesn't really solve the scale problem since the iPhone app would sign into FB for a given user, send me their Facebook ID, then my service would have to call Facebook OpenGraph server-to-server and still reconcile the FB friends list.
Would love any advice!