0

I'm trying to send App Requests from my game (made with Unity3D) using the official facebook plugin. I can login, post on wall and use graph api without problems, so I know that I'm on the right way, but when I try to send App Request the callback functions seems to never been called on my android phone. On unity3d player instead I get this error log:

400 Bad Request
UnityEngine.Debug:LogError(Object)
FbDebug:Error(String)
Facebook.FallbackData:JSFallback(String)
Facebook.AsyncRequestDialogPost:CallbackWithErrorHandling(FBResult)
Facebook.<Start>c__Iterator0:MoveNext()

I'm trying to send app requests with this code:

FB.AppRequest(
                message: "Hi! I'm playing Grave Run for Android! Download it from Google Play :)",
                title: "Play Grave Run with me!",
                callback: RequestCallback);

Maybe I'm missing some permissions ?? here is how I login:

FB.Login("read_friendlists,publish_actions", LoginCallback);

Many thanks for the help !

Luca D'Amico
  • 3,192
  • 2
  • 26
  • 38
  • 1
    What do you see in the logcat for android? – Brian Jew Jan 09 '14 at 21:53
  • I haven't debugged with logcat, since I've used the unity3d debug.log messages to try to find the reason of this issue. If needed I can try to logcat, just let me know.. – Luca D'Amico Jan 09 '14 at 22:22
  • I've used logcat, here is the log: http://pastebin.com/XjgyM4qL – Luca D'Amico Jan 09 '14 at 22:50
  • Your logcat seems fine. May I ask which SDK version you are using? Also what is RequestCallback doing? – Brian Jew Jan 10 '14 at 20:56
  • Hi briank, I'm using the latest facebook sdk (ver. 4.3.6), the RequestCallback should just debug.log the fbresult message.. Any idea ? – Luca D'Amico Jan 10 '14 at 23:52
  • Is the Unity Development Build enabled when you built this? http://docs.unity3d.com/Documentation/Manual/PublishingBuilds.html Debug messages done with `Debug.Log` won't show up otherwise. – Brian Jew Jan 11 '14 at 01:49
  • No mate I used an external tool to read Debug.Log messages on my device. By the way the callback function is never called as I've said. Everything works ok, I can select the firends that should receive the invite, but then them doesn't receive it.. – Luca D'Amico Jan 11 '14 at 12:37
  • UPDATE!! Brian, if I go here: https://www.facebook.com/appcenter/requests while logged with my friend's account, I can see the requests number increasing every time I invite this friend, but the request is not present in the list :( – Luca D'Amico Jan 11 '14 at 13:37
  • UPDATE2!! Brian, I was able to found my request in that page! I was not displayed due to the great ammount of requests.. by the way, why it doesn't appear in the notification bar ?? Many thanks for the help – Luca D'Amico Jan 11 '14 at 13:50
  • Even if you use an external tool (I'm guessing adb), Unity won't add `Debug.Log` statements to your game unless you check the "Unity Development Build". It's just a check to do a debug build instead of a release build of your game. I'm asking if that checkbox is checked. – Brian Jew Jan 13 '14 at 19:42
  • No it is not checked but I can still read the debug.log using a 3rd part tool called KGFDebugger.. – Luca D'Amico Jan 14 '14 at 11:10
  • Could you try checking the field and rebuilding it? I just want to eliminate it as a possibility. – Brian Jew Jan 15 '14 at 00:21
  • Now I can see "Development Build" on my game.. – Luca D'Amico Jan 15 '14 at 18:44
  • And there's still no messages from your `Debug.Log` in the `RequestCallback`? – Brian Jew Jan 15 '14 at 23:33

0 Answers0