Mapping App-Scoped-Ids for apps pulling page posts - facebook

We run a platform that acts as a one-stop warehouse of user's interactions with a brand, both through apps (campaigns etc) and through the pages run by the brand. So far, the linking up of facebook users across apps and page-posts was simple - since facebook passed you global facebook ids.
With v2.0 of Graph API, and the migration to app-scoped-id, a brand can still connect the app-scoped-id from various app-authentications through the /ids_for_business api call. When User's log into the app, they are considered authenticated and hence the mapping between app-scoped-ids works.
For posts pulled from the Facebook pages through the API, the "users" are considered non-authenticated, and hence the mappings through /ids_for_business call skip the app_scoped_id listed to page-post-pulling-apps.
Is there a solution to map such users into their app-scoped-ids issued to other apps under the same business account?
Alternatively, is there any other way to reliably map such users across apps and page posts?

Its not currently possible to map a user's ID across multiple apps where the user has not logged into each of the apps you're trying to map across.
The use case for the Business Mapping API it to identify the same use across the multiple apps your business owns - where the user has logged into those apps. For example, identifying which of your business's games the person plays.
The principle here is that a person's information is not aggregateable across apps unless the person has explicitly logged into those apps.

Related

Graph Api - manage multiple Facebook accounts

I have a question about Graph Api from Facebook. We want to create tool to management accounts in facebook and groups releated with them.
Basic functionality of tool is possibility to add acounts to the system, and then add you can add multiple facebook accounts to each of them. Then, system get all posts from groups releated with facebook accounts.
I did research, and I know quite what is possible and what no, but many endpoints of API requires app review. My question is about this review - wheater app like that, when one user can add multiple facebook accouns and use data (like posts, comments) from them is allowed by facebook and will pass the review?
That depends on what exactly you mean by “accounts” …
Facebook pages? Sure, you can let your app user add as many of those as they like, for the purpose of managing them, reading feed data, etc.
User profiles? That would not really make sense, because every person is only allowed to have one personal profile on the platform to begin with. And adding other people’s profiles (by having them authorize your app, using their access tokens on behalf of someone else) is likely not going to fly in review either.
when one user can add multiple facebook accouns and use data (like posts, comments) from them is allowed by facebook
“Using data” is rather vague as well; what you can and can’t do with user data is outlined in the Platform Policy: https://developers.facebook.com/policy

Facebook Account Kit and token for business

We have 3 apps using the very same user base. Users are able to use these apps with one account. Hence, we are using token_for_business id of facebook users in graph api to be able to recognise them in all 3 apps. However, we cannot find anything about token_for_business like approach in account kit documentations. Hence, we cannot recognise a user in an app, who registered in another app.
Is there anything like token_for_business in Account Kit, or should I request a feature from Facebook?
There's currently no such feature for AccountKit. Though one way that you can implement this yourself is by storing the phone number (or email, if you use that flow) for each app login and cross reference them in your own data.

Get Facebook User Profile ID instead of App-Scoped user id in Facebook Graph API

I have 6 different applications on FB which have one database with users. All of them was created long time ago, on V1.0 and I have several hundred thousands registered users. People are buying daily tickets for those games, and tickets are valid for any of games. And that works just fine.
But since V2.0 for each application I'm getting different app_scoped user ID which are different to original ID in database, so I'm getting all of them as a new users every time they change the game so purchased ticket (which is app for registering) will not be available for user in any of app caused by totally different ID's... Note that many of them don't want to leave email, so email cannot be used as parameter for user identification.
I have read about finding original user ID with API V2.x calls, but still I'm unsuccessful. Any idea of getting real user ID with V2.x API calls?
Thanks in advance!
You can´t get the real IDs in new Apps anymore, it would make the whole concept of App Scoped IDs void. But you can map the IDs of different Apps with the Business Mapping API: https://developers.facebook.com/docs/apps/for-business

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.

Obtaining an app ID on behalf of my employer

I am a programmer employed by a company to develop a web app owned by that company. We allow users to log in with Twitter. We would like to allow users to log in with Facebook. For this we require tokens to plug in to OAuth 2.
The snag is that so far as I can determine, Facebook require that apps are owned by a Facebook user, and a that Facebook user uniquely identify a natural person. I don’t want to register using my existing Facebook ID; my work identity is not relevant to friends and family, and besides, I will not be an employee of the company indefinitely. I have not found any information yet to indicate I can hand the ownership of the app to another developer, though I assume such a process must logically be required. I could violate the Facebook terms and create a new ID to register the app with, or I could attempt to coach the CEO of the company (who is not a programmer) through the process of registering for an app. This will be complicated by the fact that I can’t even get past step 1 so I can’t rehearse the process.
So my programming question is, is there a way I have not yet discovered that Facebook allows companies to delegate the chore of registering an app? Failing that, has anyone published a route through Facebook’s developer’s maze to get the OAuth keys in the minimum of steps?
You can create the app using your facebook account, initially, then you can create a Facebook Group called something like "My App Admins" - then get anybody who is important in the company to join that Facebook Group (including yourself) Then in the app settings, set that group as an admin of the app. (you can also create seperate groups for insights users, developers and testers)
Anybody in that group will now be an administrator. That way the company can control access to the app by adding or removing people from that group.
It is not an ideal solution. Facebook want to be able to link application developer accounts to real people - this is a way of preventing spamming etc.
Hope this is helpful.