4

I was wondering if somebody can help me to solve this problem. I am trying to use FB.AppRequest() in Facebook SDK for Unity to implement an Invite feature . This is the code which I use.

if(FB.IsLoggedIn)
{
    FB.AppRequest(
        message: "Let's eat and be prosperous!",
        title: "Let's eat and be prosperous!",
        callback: InviteCallback
    );
}

// ... 

void InviteCallback(FBResult response)
{
    // print response to console
}

The invitation dialog which I get can be seen here (link to Imgur). There is no "Invite" label on those buttons, and unsurprisingly, clicking them does not send any invitation. However, I can see the FBResult data, which is in the following format:

{
    "request": "ABCD",   
    "to": 
    [
        "EFGH",      
        "IJKL"
    ]
}

(more or less, since I haven't found a way to print new lines to Firebug console)

Additional information:

  • The result is the same regardless of the Sandbox setting.
  • The Unity version is 4.3.0f4
  • The Facebook SDK for Unity version is 4.3.4
  • The binary is hosted on an intranet server.
  • The Invite functionality in the Friend Smash example, hosted on the same server, doesn't work either. However, this is before the latest Friend Smash update (11/11/2013), whose Facebook functionalities I can't get to work yet.
  • Other Facebook functionalities (e.g. Init, Feed, API) work well.

I can't find any information about this on the internet. There are other questions about the Invite feature not working, but without the Facebook SDK for Unity, so I am not sure how they can be helpful to me.

Thanks a lot!

Community
  • 1
  • 1
Nicholas
  • 95
  • 1
  • 9

1 Answers1

3

Just to clarify: the envelope button sends the invite, and it does so immediately when it is clicked.

If your app is in sandbox mode, people won't get notified when the request is sent. Look for the request in https://www.facebook.com/appcenter/requests as the recipient and see if the request shows up there.

If this still doesn't work, can you send me your fbresult data? unity-sdk@fb.com. thanks!

aaron
  • 1,746
  • 1
  • 13
  • 24
  • 1
    Thank you for your reply, @aaron. I found out that the request did reach the recipient, but it could only be seen on the App Centre/Requests page. Also, the link there leads to a URL in the following format: , which gives "Sorry, this page isn't available" error. I usually access the app via the following address: . The invitation was sent to a developer friend, but anyway the problem persists whether or not the app is in sandbox mode. PS: I'm sorry but the formatting somehow doesn't work on my side – Nicholas Nov 15 '13 at 17:20
  • 1
    @aaron, Could you please see this question too? http://stackoverflow.com/questions/23388069/facebook-fb-init-fail-for-android-unity – silentkratos Apr 30 '14 at 12:38