In-app friend list from Facebook Graph friends - android

I am new to developing android apps with facebook functions. Currently my app has the functions for log-in and friend list fetching.
What I want to do is for my app to have its own friendlist (sort of social network) so when the user first logs in, he has no friends, but then he can add them from the list of friends from facebook. However, what I don't want is for the user to send more than one friend request to a single person.
Actually I store the invitations he sends and the friends he already has but when I fetch the Facebook friend list via Graph API it gives me ALL the friends that are using the app and I have to filter it to remove all the current friends and the friends he already send invitations to.
I was wondering if there is some way to create a private facebook list with the friends the user has send invitations to, and then when I fetch the normal friendlist (/me/friends) to automatically remove the ones that are registered in the private friendlist. Or if there is another way to do this and avoid in-app list filering

For that case, there is no way to get all friends anymore. You can only get those who authorized your app too with /me/friends.
Everything else is explained in the answer of this thread: Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app
If you understand that, then i am not sure what your question is, to be honest. If you want to create your own friendlist, you can just do that, but there is no Facebook API for this.

Related

Keep track of friends signing up with Facebook in Android App

I am developing an Android App and using Facebook Login to let user sign up using their Facebook Accounts.
I am a beginner, so wanted to know how to keep track of user's friends signing up on my application and accordingly push notify both users. I am adding a timeline, so I want to show user posts from his social circle only.
Resolution: We are now considering using Invite Friends in latest version of Facebook Graph API.
Facebook did an update a while back , I dont recall which version of the SDK or Graph API (Graph API 2.0 maybe?) this took effect in but you really cant do that kind of thing anymore. Now when you request the list of friends for the user the user ID for the friend that is returned in that list is now randomly generated and not their real account ID.
So when a friend that was pulled in from another user attempts to login with your app the ID you get for them is entirely different. The only real way to do this would be to then name match really but that is entirely unreliable in most cases.
EDIT
This only behaves this way for games or for using the tagging api. Not for general friends list request.

Facebook invite friends to Use Android App

I am little bit confused about new api and app review steps of facebook api. I need to have facebook login and get the list of friends of a logged in user and sent invitation to use app for selected friends. What are the steps i should follow it? do i need to submit my app for review in facebook?
You canĀ“t get all the friends of a user anymore, at least not for an Android App. You only get the friends who authorized the App too.
There is invitable_friends for inviting friends, but:
The Invitable Friends API is only available to apps classified as Games, which also have a Canvas presence. This API is not available in v1.0. It may be called by mobile games as long as they also have a Canvas presence.
You may want to read this too: https://developers.facebook.com/docs/apps/faq#invite_to_app
Facebook change there api police. if you do not get Friends to send invitation. if you want to do that then you need to submit your app for review by facebook team but if your app is Game then you able to do that.
But another way, you can do that, You can do it via facebook web-dialog to send invitation.
Thanks

Facebook friend list in android' error [duplicate]

is there any way to fetch list of friends using facebook 2.0 API?
I was reading this upgrade from the API and it seems it is quite difficult to fetch the friends now,
but I have seen 2 permissions
read_friendlist
user_friends
Is their any way to fetch list of friends? and what about the widgets that get friends from facebook, will they go down?
In v2.0 of the Graph API /me/friends returns the user's friends who also use the app. You need to be granted the user_friends permission in order to get even app-using friends.
There is no way in v2.0 to get the full user's friends.
However, you may use the https://developers.facebook.com/docs/graph-api/reference/v2.0/user/invitable_friends API or the https://developers.facebook.com/docs/graph-api/reference/v2.0/user/taggable_friends APIs to get all the user's friends with tokens than can be used for tagging and inviting.
the read_friendlist perm doesn't get you a list of the user's friends, it gets you the list of a user's friendlists which may be used to build a custom privacy selector when publishing stories to Facebook.
As of 4/30/2014, you can only retrieve the friends who also use the app.
There are, however, specific methods for apps in the 'Game' category for inviting friends.
https://developers.facebook.com/docs/graph-api/reference/v2.0/user/invitable_friends/

Facebook Android API- How to know when friend list of a user has updated?

Currently i am working on facebook based android application and i store all friends of user to a sqlite database on login. I want to update this database only when user adds or removes a friend. How to know friend list updated not?? any FQL or Graph api calls regarding this??
Note: checking friend count is not a good solution because if user adds a new friend and removes an existing one then we go wrong!
Another solution is comparing our database friends with the friend list from facebook server, but its long process if user have large number of friends.

Find user's Facebook Friends that also use my Android App?

My app has an instant messaging feature. So it has a contact list.. I want to populate the contact list to help get my user started with some friends..
After asking permission I will:
1) Search the local contact database, send the phone numbers to my server and check for other accounts using my application that have the same phone number.
2) Ask them if they want to also import their facebook friends. At which point I suppose I will ask them for their username and password for facebook, log in to the Graph API and request their list of friends..
My question is, once I am iterating the list of friends from my user's facebook friends list, how can I link their facebook friend ID (or whatever identifier Facebook gives me) to some other ID in my app?
Will I see the email of all my friends users (after research, it looks like not)? Will I just get a numeric Facebook ID? If so, then how am I to harvest facebook IDs from all my users that have linked their account to facebook in my app?
I suspect this feature has been implement by other third party developers. So I'm looking for the strategy to identify and link my app users, to facebook accounts, and then iterate my app users friends list to find common users.
The question I am answering from a user perspective "Which of my facebook friends are already using this app, named XYZ on android"
You can store a user's Facebook ID alongside their other user information for your app, then match on the retrieved IDs from a Graph API /friends call. This way, you'll be able to see which friends have also linked the app to their Facebook account. You won't be able to fetch email addresses for a user's friends using the API.

Categories

Resources