- Home /
iOS Facebook integration issue.
I'm attempting to integrate Facebook into my application by writing plugins to communicate between Unity and XCode. Since this is my first plugin. I started out simple, implementing the Facebook Login and Logout functionality. I'm able to make my application interact with Facebook; performs fast-app switch upon hitting GUI button to prompt login, etc.
But after Facebook authenticated my account credentials, it performs another fast-app switch to transit back into my application. For some strange reason, the Activity swaps to my application's splash screen for a very short instance and then it resumes the activity. (Well, this looks pretty ugly :( ). Am I doing something wrong? Can I avoid this somehow or at least HIDE it? Because it gives a really unprofessional feel when it does this...
I have read the tutorial manuals on Facebook Developers webpage and modifed the AppController.h/mm built from Unity with additional code for instance
// New code taken from Facebook Developer webpage.
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
return [[FBSession activeSession] handleOpenUrl:url];
}
// For iOS 4
// Callback order:
// applicationDidResignActive()
// applicationDidEnterBackground()
- (void)applicationDidEnterBackground:(UIApplication *)application
{
printf_console("-> applicationDidEnterBackground()\n");
}
......
Please do not ask me to refer to Assets Store such as Prime31. I heard that it is good, worth buying and cheap. But I really cannot afford to buy any plugins/add-on. I think I'm almost there, just couldn't figure out what other steps I have missed out. Anybody out there is willing to provide me with any suggestions or guidance?
Thank you.
I'm working on Unity 3.5.7 with Facebook SDK v3.5.1
Your answer
![](https://koobas.hobune.stream/wayback/20220613104447im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
iOS location permission plugin build fails 0 Answers
Unobtrusively extending AppController delegates. Possible? 2 Answers
Unity iOS how can I see my classes in xCode converted in obj-c 0 Answers
Error creating ios simulator build for facebook review 1 Answer
How do I make iOS build that works on the iphone 5 simulator? 0 Answers