Facebook-Unity-SDK Feed Callback Not Called
Asked Answered
P

1

1

Problem
FB.Request() callback parameter is never being called on Android. It works fine on iOS.

Info
Unity Version: 4.3.0f4
FB SDK Version: 4.3.6
FB SDK Build Version: 131121.17562b74012d24a

Repro Steps

  1. Start a new Unity project and import FB SDK 4.3.6
  2. Change to an Android project and fill out your keystore info
  3. Edit FacebookSettings to match what's in developers.facebook.com in your app
  4. Edit InteractiveConsole.cs to add a Debug.Log() on the first line of Callback(FBResult result) (which is the function that should be called when a feed request is done).
  5. Build the project with the InteractiveConsole scene
  6. Init, Login, and try to post. Notice that your debug log never occurs even though the adb logcat says "“FBUnitySDK( 3272): sending to Unity OnFeedRequestComplete({“id”:”12321312321 blablah”})"

Details
We noticed that OnFeedRequestComplete(string message) in AndroidFacebook.cs, has nothing in it. Also, the callback parameter in FeedRequest(params…) in AndroidFacebook.cs is not being used at all.

Sorry if this is a known-issue but I don't see any similar posts on StackOverflow or on developers.facebook.com/bugs.

Palmieri answered 4/12, 2013 at 23:22 Comment(2)
Thanks, we've made a task for this and are looking into it.Rent
Until this is fixed by Facebook, we were able to make it work by editing a few lines of code in AndroidFacebook.cs. I can't figure out how to format a comment so it's not ridiculous in StackOverflow, so you can view the changes here: pastebin.com/qJVB3fJc Not a clean solution, but it works.Palmieri
F
2

Thanks for pointing that out. I'm getting a fix in for that. It'll be out for the next update.

Funny answered 5/12, 2013 at 4:39 Comment(1)
@Brain Jew Is this fixed yet? Having the same problem with SDK "FacebookSDK-150414.unitypackage"Mulderig

© 2022 - 2024 — McMap. All rights reserved.