Understanding the Facebook Audiences API - facebook

I'm looking to set up the Facebook Audiences API into my PC game but I'm a bit confused about how Facebook matches this to a real-world user.
I don't collect any user data in my game other than a unique userID. If I use the "External Identifiers" example in the FB documentation and push the userID back to Facebook, how does FB then match this to a Facebook user? Do they just collect IP address from the payload and use the userID to find a unique user or something else?
Thanks in advance.

Unless players of your game can use their facebook accounts to create user id's for your game, it is unlikely that you will be able to create audiences based on this data. Facebook isn't interested in the usernames of people who play your games, they would have no reason to store this information.
One thing you could do is allow players to create an account by signing in with their facebook id. This would let you put them on an advertising list, without having to try to match up user names to a game that facebook doesn't know about.
Here's a link to a quick start for Facebook Connect, which would allow you to do what I detailed above.
https://developers.facebook.com/docs/javascript/quickstart

Related

Search the Facebook UserName in Unity

I'm making a game where I can link the user account with Facebook. So far so good, but I need a value that identifies the Facebook user, as the name, but that is unique. So I thought of user name that is unique per account. But I found no information in the Facebook documents that show how to get this information. Does anyone know how I can get this? And it is not the name that the user puts in his profile, it is the username.
The best way to do this (and the best way to store) is by the use of User IDs. Facebook allows you to do this.
User: https://developers.facebook.com/docs/graph-api/reference/user/
I personally don't use Facebook API but from experience you would use an User ID.

How to get link to user's timeline from Facebook Messanger Platform API?

Did I miss sth or it is impossible to get link to user's timeline from Facebook Messenger API?
According to: https://developers.facebook.com/docs/messenger-platform/user-profile User Profile API doesn't return link in fields.
Is there any other option?
You would have to use the User Profile endpoint and use all the information for determining which Facebook user it matches to. If you image match the profile picture and match all the other information, and compare timezone to their location, it is probably possible, but it's probably not easy.
Making a workaround like this might not be a bad idea because Facebook seems to want to keep all the stuff seperate right now, as their user ID's are different for seemingly everything. The User Profile endpoint exists for personalization purposes, but it doesn't identify a user.
The user matching through login might also be useful as a outside of messenger solution, but I'm not sure exactly how that would be done.

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.

Can I use an app user's friend public data (id, name, gender) in other app users app context

I am developing an app in which I want a user (Alice) to send a list of few of her friends to one of her other friends (Bob). Bob is not a friend of the people on Alice's list.
The list that will be displayed to Bob will contain only public data that can be queried from facebook by the ids of the friends on the list. Meaning, I will only save the ids of the friends.
Is what I'm planning in accordance with the Platform Policies? and particularly with sections 2.4:
A user's friends' data can only be used in the context of the user's experience on your application.
and 2.11:
You cannot use a user’s friend list outside of your application, even if a user consents to such use, but you can use connections between users who have both connected to your application.
If you provide that information inside your app context I see no problem... Meaning If in your app you sugest the Alice Friends to Bob you'r OK.
It's been done time and time again...
Seems like you may be looking for Facebook's friend suggest dialog, which is part of their API. Facebook will suggest and send a friend request on your behalf.
https://developers.facebook.com/docs/reference/dialogs/friends/