I instanced a UITabBarController as the root controller for my app delegate. For FB IOs SDK it says to do the following inside of:
-(BOOL)application:(UI开发者_C百科Application *)application handleOpenURL:(NSURL *)url
"In this method, call your application's Facebook object's handleOpenURL method, making sure to pass in the url parameter."
Is the standard way to use FB ios sdk with a tab bar controller to subclass UITabBarController and create the FB object there? Or is there another way where i don't have to subclass uitab bar controller and create the fb object else where?
You don't have to subclass UITabBarController
. There isn't a standard place to create the Facebook
object. You can create it anywhere you'd like. It depends on your application. Check out AcaniWelcome. It creates the Facebook
object in the FacebookUser : ManagedObject
loadSession
instance method.
you can use fb ios sdk as you want. You don't need to subclass UITabBarController.
精彩评论