The Facebook Unity plugin for Android doesn't play nice with other plugins as it
overrides the MainActivity, so unless you launch it first (from the AndroidManifest.xml)
it won't return any data (login info, friend lists) back to Unity and to your game.
Of course, most other plugins now don't work.
I have my own plugin (pure java compiled in eclipse) that handles Saving, IAP, notifications, etc and i launch that plugin first - to make the Facebook plugin work you have to add a small bit of Facebook "Session" code to onActivityResult in your own Main Activity class:
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// Pass on the activity result to the helper for handling
if (!mHelper.handleActivityResult(requestCode, resultCode, data)) {
// not handled, so handle it ourselves (here's where you'd
// perform any handling of activity results not related to in-app
// billing...
// Facebook callback
if (Session.getActiveSession() != null) {
Session.getActiveSession().onActivityResult(this, requestCode,
resultCode, data);
}
super.onActivityResult(requestCode, resultCode, data);
} else {
}
}
You need the FacebookSDK.jar for this to compile, and i was as surprised as anyone
when it worked; but this won't help if you are using other 3rd party plugins and
don't have access to their source.
Writing Unity plugins for Android is a nightmare.