问题
I've downloaded the latest SDK (3.1.2) and tried exporting the test scene to iOS and Android. The FB.Init() button works fine on both, but the login has been giving me grief.
When I build to iOS, it pops up the login screen inside my browser. After I put in my details, it then tells me:
Sorry, this feature isn't available right now: An error occured while processing this request. Please try again later.
When I build to Android and hit login, it asks me to confirm that I want the app to access account features, then throws this error:
NullReferenceException: Object reference not set to an instance of an object at Facebook.AndroidFacebook.OnLoginComplete (System.String message) [0x00000] in :0
Dialog options open fine inside the editor, but then the Login feature is greyed out there anyway, so I can't test it.
Here's everything I've done so far:
- Created an app inside Facebook.
- Placed the app id inside the settings in Unity.
- Filled out the sections for both native iOS app & native Android app on the edit app screen of Facebook.
- Copied the details for Android from the website and placed them into the settings in Unity.
One thing I haven't done is this step:
Beta Only - Step 3: Send your Facebook contact the App IDs you wish to use to integrate with Unity. It is necessary for Facebook to whitelist them to access Unity-specific integration options.
Is this why these features aren't working? Or am I missing something completely?
来源:https://stackoverflow.com/questions/18703538/new-facebook-sdk-for-unity-trouble-logging-in-on-ios-android