Facebook Account Kit and token for business - facebook

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.

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

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.

Concept demo for "Internet of Things & Social Network"

This is my first post in this facebook's stackoverflow forum. My background is on wireless baseband prototyping on FPGA platform and do not have any prior experience with facebook development. Now i have a chance to work on social network related development work and i'm quite excited. Anyway above is just my background introduction.
Here i want to create a virtual Facebook user. Imagine you are interacting with your refrigerator on Facebook. This is the kind of concept we want to show.
Following are the functionality i would like to have at my virtual's facebook account..
1) recognize real friend check-in and messages posted on his/her wall.
2) ability to write messages on real friend's wall.
3) recognize messages posted on virtual account's wall.
4) ability to write message on virtual account wall.
How can the virtual account be equipped with such functionalities? Can i achieve by writing a facebook application? Please advise the direction i should look at.
Cheers,
Phone Naing
The facebook api lets you query their graph but it requires an access token to do that.
There are 3 main token types: User, Page and App.
Your app would be able to get an app token easily but it's limited to public data only, like data of public pages.
For a page and user tokens you'll need the actual user to interact with your app in order to get the token.
You can get the friends check-ins, feed, images, events and so on by asking for the right permissions from the user (there are user permissions and friends permissions).
You can also post to friends wall with the "publish_stream" permission.
For "recognizing" posted items on a user wall you can either recheck the user feed every once and a while and compare what you had and what you get or use the Real-time Updates.
With all of that said, I seriously doubt that you'll manage to pull something like that with the current limitations of the facebook api.
Let's start with the fact that facebook does not like profiles to be "vritual", they want the profiles to be of real people.
Of course that there are plenty of virtual profiles but they can remove them (and sometimes do).
Even if you do have these virtual profiles, since they are virtual they won't interact with your application using facebook, that is won't be logged in to facebook via their channels (web interface, android or iOS, etc).
Because of that you won't be able to get a user access token which you need for all of the information you want.
Since the deprecation of the offline_access permission there's no way to have a token which is valid for a user for more than about 2 months, which means that for each "virtual user" you'll need to log him in to facebook and then interact with your app to get a new token.
You can create a page instead of a virtual profile, which will also be fine with facebook.
But here again, you need a user to actually interact with facebook and your app to get a valid page access token, and even if you get that, it's not enough for the data you want to ask for.
To put it all together:
I think it can't be done.

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!

Must a Personal Profile be Used to Access the Facebook Graph API?

I'm trying to access Facebook data using the Graph API from an external commercial application. I've created a login for my company and gather that I need to register a Facebook App in order to use the Graph API.
However, I am confused about the Facebook requirement to associate a Personal Profile (a real person) with the Facebook App. Why must a person become connected to my organization's application?
What if I leave the organization? Will the company I worked for need to pick another employee in order to access the Graph API?
Surely I am missing something.
Your question here seems to be about the Facebook API in general and registering an app for it, rather than the Graph API per se. The answer to the general question is that, as with the Twitter API and certain Google APIs, the personal account is used as part of the process of validating that the app is tied to a real person. Luckily, there's a good solution in place for handling when app developers no longer work for a company: another app developer can remove them from the app. You can list someone else on your team as a developer of the app and they will have the same rights to edit it as you do.