Invite new users for my app using app notifications facebook - android

My app logs in via facebook and all friends of facebook user logged is listed to be invited to download my app. I want guests to be advised via facebook through a notification.
I've done the test via "Graph Api Explore" as follows:
POST/{recipient_userid}/notifications? access_token = ... & template = John is inviting you to learn a new app. & href = ... "
but I noticed that the notification comes only to those who already have my application installed.
{return: "(#200) Cannot send notifications to a user who has not installed the app"}
how do I send notifications for facebook users that still do not have my application installed?
thks!

Because notifications are not meant to be used to invite friends. They're used to notify your app users of events happening in the app (e.g. if their high score was beaten in a game for example).
If you want to let your user invite friends to also use the app, I'd suggest you use the Request & Invite features of the Facebook SDK:
https://developers.facebook.com/docs/tutorials/ios-sdk-games/requests/
That tutorial shows you how your user can select a list of friends to invite and then write a message that will accompany the invitation.

Related

Prevent inviting existing users or previously invited

I am using AppInviteInvitation to let users invite other others for my app. Does anyone know if there's a way from the API to prevent users from these two scenarios:
already have the app installed
received the invitation previously?
Thanks!
Firebase App Invites does not allow you to get information on the list of users who has been invited before or already have an application in their smartphone.
I would recommend to use combination of "Firebase App Invites" and "Facebook App Invite".
Facebook App Invite take care of both the scenarios you mentioned:
1) Already have the app installed - If the user already have an app installed the users won't see your invite in their notification.
2) Received the invitation previously - If the users already received the invite before they won't receive it further after a threshold time.
But again you don't have any API to access this information, the above scenario is taken care by Facebook itself.
Google App Invites only allows you to find out the fact that you were invited, but does not store this information anywhere. You can use the services such as Kinvey, Deployd, PushWoosh and so on, in which you can record information about the invites sent in database. So if the invited user has an installed application you can fix the invoice repayment there, and the inviting user in the application sees how many invitations he has left to send.

Facebook appinvite, how to handle the referral/promo code after user install a new app?

With Facebook AppInvite, i want to send invite with an invitation code. But i want that if the user don't have the app installed and if he need to download it first from the play store/app store, then after the first launch of the app, the app must be able to retrieve the invitation code (from referal for example? or delayed deep link?) ...
Is it possible to do so with the facebook SDK ? if yes is their any exact tutorial / sample how to do so ?
I would also like to do the same with facebook share

Facebook App Invite - Retrive Facebook ID of recipient

In my app if person A invites B using app invite (As per latest app invite https://developers.facebook.com/docs/app-invites) and when B joins app using Facebook login certain action is needed to take. As per latest app invite I could not see if I can get Facebook id of recipient. In old app invite (using FBDialog) it was there in response. My target is if I get emailid or facebook id of friends invited using Facebook App Invite then I can keep track of rest from logic in app.
Can any one please suggest if is there any way to achieve this ?
Use this Link to access details , u can get Profile id easily using Graph API of facebook. before that you can get the access tokens after login you can get the Profile id.

Getting Facebook user ID from message dialog

I am developing an app that would allow users to invite his friends to an event.
What I want to achieve is that when the host is inviting friends, he can invite those that are not on the app through a button. This would send a message to those invited friends that includes a link to install our app. Once they install the app, they can login and will immediately view events he is invited to. Can this be done?
The concern is that when the user who receives the invitation message and installs the app and logs on, how will the app know the person who logged in is the person that is invited in the first place? If the app cannot associate them, how can we provide the relevant events to him once he has logged in? Is what I want to achieve unattainable?
I think it might be done through the old Facebook API, but their new one will only allow an app to access a user's friends who are also on the app and not those that are not on the app. In this case, is there a way for us to pull the UID of those invited through FB's messaging dialog? And will this work with group chat?
I know that another way will be to do it via phone number confirmation and accessing the user's contacts, but I want the invitation process to be through facebook if that is possible.
Thank you all for your help in advance.
Lok

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