Facebook Unity SDK AppRequest not showing notification [Android] - unity3d

I am making game with Unity v5.2.1 + Facebook Unity SDK v7.2.0 for android. My game have feature to invite friends. This feature implemented by calling FB.AppRequest() function.
It works quite well, but the problem is my friend not receiving an android notification. The only way to know that the invitation is sent, is by opening facebook android app and click the world icon (notification page) on facebook.
How can i show an android notification when invitation is sent to friend?

Facebook does not do that for you automatically. You need to implement this system yourself.
Here is how I would do it:
A sends AppRequest to B in you app
In the callback, you know the target ids from the "to" list, report that to your server if you have one (and it is required for this system to work)
Server sends a push notification to the target device that is associated to the target facebook user id

Related

Unity Facebook SDK appInvite not showing notifications

I'm implementing a game which features inviting your Facebook friends to your app using the Facebook SDK.
The code I'm using is:
FB.Mobile.AppInvite (new System.Uri(appLink), null, callback);
The app link is the proper one setup in the facebook page of the app.
The problem is this: the user doesn't receive a notification inside the FB app to install my game. Instead, you have to go to the Facebook App -> Apps -> App invites and it appears there. In the Facebook docs it says the user should receive a notification to invite.
What is the issue here?
PS: the app is not live yet, but the friends that are invited are set as testers.

How can I have Google App Invites recognize the device and send you to the appropriate store? App Store vs Google Play?

I plan on implementing Google App Invites on our iOS and Android app. What I have not been able to figure out yet is will an iOS user be able to invite an Android user and vice versa - and is there a way to have the invite recognize which device the recipient is using and send to the correct store?
You can send invites cross platform between Android and iOS, even have a mixture among recipients in a single invite.
For app invites to find the correct cross platform app to install the mapping must be defined in the developers console (console.developers.google.com) by putting them in the same project.
When sending an invite from an Android app the link that is generated and sent in the invite is a link to the play store. So currently, I'm guessing Android users can only invite Android users.
The link generated from an iOS app is to a webpage, so theoretically it's possible to identify the OS via user agent and send to the correct store. Currently that does not happen though, the page redirects to iTunes when opened on Android as well.
So, it seems that currently you can only send an invite to the store corresponding to your OS, i.e. Android users can only send an invite to the play store and iOS users to the app store.

Unity Facebook apprequest works but no notification shown

How do I make my mobile game send a request that is shown as notification like in Candy Crush Saga game.
I went through this App requests successful, but no notification shown but can't find the solution. I don't know what to put in my canvas URL.
GAME is developed in Unity3d.
Solved ..... Your mobile app must pe on facebook (i.e on facebook appcenter ) ..then only it will be shown as notification
I faced the similar issue .. there is something that need to be done on FB App settings->Basic, Add another platform "Facebook Canvas". This solved the issue
The canvas apps means- the apps displayed inside facebook.com.
I think you are having the mobile app not a canvas app, so Notification API, which is still in beta do not supports the notification in mobile. Acc to doc-
Currently, only apps on Facebook.com can use App Notifications. Notifications are only surfaced on the desktop version of Facebook.com
So instead of notifications API, you can use different kind of Requests- whichever is more significant in your case.

Facebook Mobile Notifications

I'm trying to send notifications to user through an app, but they don't show in any mobile device.
For example, the user makes an action that sends a notification o other user. If he is on a Computer browser he can see the notification, but in iOS/Android/Mobile Facebook the notification don't show up.
Can you guys help me?
Regrads,
Elkas
Are you talking about the Notifications API where you make a POST request to /{recipient_userid}/notifications?
If so, this is intended behaviour. From the docs:
Note: Only apps on Facebook.com can use the Notifications API. Also
these notifications are only surfaced on desktop version of
Facebook.com.

On FACEBOOK ios app can't got "push notification" via sent apprequests?

In my app, I can send the apprequests to my friends via FB api, and they can receive the Notification on iOS Facebook app. But here is a difference between "apprequest" and "postToWall". If I posted to my friend's wall something via Web, my friend would receive "Push notification" on his iPhone immediately. If I sent the apprequests to him, he wouldn't receive "Push notification" and just only "Facebook notification". Moveover, he needs to run the iOS Facebook app to update the data to receive the "Facebook notification".
Does anyone know this ?
For the app requests to work fully, you need to have a canvas app specified. Otherwise the notifications won't work as expected. From
http://developers.facebook.com/docs/reference/dialogs/requests/
Requests are only available for Desktop Canvas apps and not websites.
Accepting a request will direct the user to the Canvas Page URL of the
app that sent the Request.
More information can also be found here: http://developers.facebook.com/docs/requests/
Thanks a lot . And I found this http://developers.facebook.com/bugs/283253458391756 .
Moveover , my application works right after removed the parameter "notification_text" when using api "apprequests". It looks the FB demo Hackbook just misgruided me .