Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by usephj · Jun 19, 2013 at 11:36 AM · iosfacebookxcodeobjective-c

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

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

14 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

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


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges