3

I am using Unity 4.1.2 I have downloaded the latest Facebook SDK for Android package for unity from the developer's site. The package file name is "FacebookSDK-140401.unitypackage" The package is: 5.1 , April 1,2014 I created a new empty project. Imported the package. Opened the Example scene that came with the package: "InteractiveConsole" I played the game in my Unity Editor and pressed FB.Init() it worked fine. Here are the screenshots of the game and debug output.

Game Screen Debug Output

The Facebook Settings are as follows: FacebookSettings

you are free to use them and test and revert to this question.

The problem is this works fine in Unity Editor, but when I build the app and transfer it to my android phone(Samsung Galaxy Tab 2) and play it, the screen opens and everything looks okay. when I hit 'FB.Init' button, the game hangs for a while and it crashes to my home screen.

PS: I don't have any Facebook App installed on my phone. Is it necessary?

3
  • @aaron, I am tagging you in this question, becoz i saw you solve many other questions in this field. Please don't mind. Thanks in advance. Commented Apr 30, 2014 at 12:27
  • please help me.. I am about to go crazy.. Commented Apr 30, 2014 at 15:01
  • hi @silentkratos, really sorry for the delay in getting back to you. It looks like your app was deleted on April 29. Is this related? Also, were you actually able to login using an access token in the editor? Also, can you post the android logcat log so I can see what your app is doing when it is trying to login? regarding login: you don't need the app installed to login, it should use a webview in that case
    – aaron
    Commented May 14, 2014 at 16:34

1 Answer 1

0

I faced same problem, working fine in unity editor, but not working in android phone. I was using game analytics sdk also, so I got two support-version in my Assets folder:

  • 1st one in Assets\Plugins\Android\support-v4-24.2.0
  • 2nd one in Assets\FacebookSDK\Plugins\Android\libs\support-v4-23.4.0

As not support more than one support-version, I deleted 2nd one.

For me it was the problem, FB.Init() was not working in phone.

When I delete First one and keep the 2nd one, Its worked!!!

Not the answer you're looking for? Browse other questions tagged or ask your own question.