I am currently using the following code to let the player invite other players to my multiplayer game:

FB.AppRequest("Test Message", callback: this.HandleResult);


FB.AppRequest("Test Message", null, null, null, null, null, null, callback: this.HandleResult);

When tested on an Android phone, it only brought up a Facebook dialog box for the player to choose his/her friends. Clicking "Send" would close the dialog box, but no message whatsover would be received on the target person's Facebook.

I used to do:

FB.Mobile.AppInvite(new Uri("xxxx"), callback: this.HandleResult);

but I understand this has been obsolete, invoking only a black blank screen.

I applied for a 'user_friends' Facebook permission but was told it was not required.

Both 'Single Sign On' and 'Deep Linking' have been enabled on the Basic Settings page at Facebook Developer.

What else should I try?

I tried to print out the result of the callback function which looks like this:

public void HandleResult(IResult result){
    string r = "";
    if (result == null) return;
    if (!string.IsNullOrEmpty(result.Error)) r += "Error Response: " + result.Error + "\n";
    else if (result.Cancelled) r +=  "Cancelled Response: " + result.RawResult + "\n";
    else if (!string.IsNullOrEmpty(result.RawResult)) r += "Success Response:" + result.RawResult + "\n";
    else r+= "Empty Response\n";
    GameObject.Find("FBText").GetComponent<Text>().text = r;

and obtained the following:

Success Response: {"request":"415323562654670","callback_id":"2","to":"3XXXXXXXXXXXXX"}
   Error: null
   Cancelled: False
   RequestID: 415323562654670

The request seemed to be successful. However, no invitation was received at the target account.

I am using the latest Facebook SDK -- version 7.15.1.

  • \$\begingroup\$ First of all, I recommend using version 7.13. Version 7.15 is broken as hell, there's an issue with in-app purchases callbacks which causes crashes. Regarding the problem, I remember, that when I published my first app, after 1 or two weeks the FB login stopped working, with a message that one of the tokens is the debug token. I don't really remember which token was that, but when googled, I found it and replaced it. I'll try to look at that later and post it here. \$\endgroup\$ – Jacob May 5 '19 at 10:11
  • \$\begingroup\$ Did you ever managed to resolve this? I am running into exactly same issue right now. Though my app is not yet published, so maybe that could be an issue? \$\endgroup\$ – Michal Sep 25 '20 at 8:21
  • \$\begingroup\$ I don't think publishing is the issue as Facebook is not directly linked to Google Play Store. They made some changes to their APIs. I gave up trying and just removed that functionality in the end. \$\endgroup\$ – Chong Lip Phang Sep 25 '20 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.