Managing facebook invites with new API 2.0 on android - android

I have seen some android apps around that are able to invite friends to the app and detect when these friends have accepted the request.
I have been reading a bunch of documentation there at facebook and I can see I just need to create a request dialog to let the current signed user invite people. The problem comes when I want to know if this invited people have accepted the invitation and have installed the app.
First of all, It seems that I can just use the invite api if I have a canvas application beside the android one (At least this is what the docs state when using new 2.0 api -> "The invitable_friends API is only available for games that have a Facebook Canvas app implementation using version 2.0 of the Graph API."). Does this need to be in production too? Or I can just leave the canvas application as a placeholder there at facebook developer portal and just use the android one.
Second, How am I supposed to query the information I need (check if the friend the user invited has accepted + installed my app)?

The solution is a bit more complex that what it seems. Here is an approach you can take to get this working:
From inside your game, you can invite non-player friends by querying the Invitable Friends graph api call newly introduced in 2.0, and then creating a multi friend selector to invite those friends.
Suppose a player accepts that request, and enters your game. Their URL will contain extra information (won't be just app.facebook.com/yourgame), so you have to use Deep Linking to parse that extra information, and know that the user came because YOU invited him (you can send data in the request to help you do this). After you do this, a server is needed with a backend to record that your friend accepted your request and is playing.
Now, in the sender account, you need to query the server to see if any friend of yours accepted, and then give the appropriate message/reward.
Hope this clears up how to achieve this!

Related

How to get invitable friends from facebook with deprecated api?

I'm writing an game for android which uses facebook to keep track of user to save his game state in the cloud. We want to allow the user to invite his friends from facebook. However the facebook graph api no longer supports to get invitable friends (since April 4th https://developers.facebook.com/docs/graph-api/reference/user/invitable_friends/)
I can't find in page any information about how to workaround it. Is that it? No more ways to invite friends?
We have written an article on this subject, read here.
If you have a gaming app you can still use the GameRequest dialog. Facebook App invites was also deprecated back in Feb. However, our data has shown that organic installs through Facebook are only 1% when compared to other channels like WhatsApp (see a study by Sega and GetSocial).
Disclaimer: I am the founder of GetSocial
Currently no work arounds.
Returns Empty Set — The following nodes and edges will now only return
empty data sets:
/user/invitable_friends
Breaking Changes : https://developers.facebook.com/docs/graph-api/changelog/breaking-changes#games-4-4

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.

How to Invite facebook friends though my application?

I try using this link this. In this tutorial i post my app link only my wall. But i want to share my app link to all my friends. Same like as a XYZ invited to you to try ABCapp only in notification bar. When click on it open google play store of my app page. I want to share my app app link to app facebook friends or selected facebook friend. How can i achieve this?
To invite friends through your app you can use App Invites. Before using this feature make sure to set up your Android Facebook SDK version to 4.0 or later.
You can take a look at the overview in this link
https://developers.facebook.com/docs/app-invites/overview
For the implementation you probably need this
https://developers.facebook.com/docs/app-invites/android
https://developers.facebook.com/docs/apps/faq#invite_to_app
If your app has a Canvas presence, you may also use the Requests Dialog on iOS and Android
If your app does not have a presence on Facebook Canvas: You may use the Message Dialog on iOS and Android, or the Send Dialog on Web
I assume you don´t have a Canvas presence? In that case you should not use App Requests.
Basically what you need is the list of all the friends of user on facebook to invite them. you can get ALL friends' list only if your app is in "GAME" category.
If not, then you can still get the friend list of user , but only some, not all. refer to terms friends and invitable_friends on facebook.
So, here are few things you can do (BUT NOT RECOMMENDED AT ALL)
Change the category of your app to "GAMES" & you'll be able to get
all friend's list & then you can use WebDialog & WebDialog.RequestsDialogBuilder to invite that friends
give any link to canvas URL on facebook app setting. that link will be used only when user clicks your notification from web. that link won't affect your app in any way.

Facebook unity sdk: is it possible to send friend invites/app requests to non app users?

I'm working with the official facebook sdk and example scene for unity and am sending app requests using : FB.AppRequest() which returns a list of friends to send invites to.
However no matter what I try, I only get a list of friends associated with the app and cannot see any other friends who haven't played the app.
I have even tried setting the 'app_non_user' filter, but this makes no difference.
I have read on the Invitable_Friends api, but am not sure how this would be implemented in the unity sdk.
Any advice would be much appreciated. Thanks
Your app must be approved by Facebook to get people's friends lists beyond people using the app. Look in the developers.facebook.com section to find how to do this. I haven't done this, but a game I worked on needed to do this.
Getting approved involves sending your app and it goes through an approval process.
Here's the relevant bit:
https://developers.facebook.com/docs/apps/faq#invite_to_app
"If your app is a game and has a presence on Facebook Canvas:
You can use the requests Dialog and set filters=app_non_users to filter the dialog to only show people who don't use the app."

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

Categories

Resources