Created
November 10, 2012 01:14
-
-
Save BenBarahona/4049375 to your computer and use it in GitHub Desktop.
AppDelegate modifications for Facebook SDK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)applicationDidBecomeActive:(UIApplication *)application | |
{ | |
/* | |
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. | |
*/ | |
// FBSample logic | |
// We need to properly handle activation of the application with regards to SSO | |
// (e.g., returning from iOS 6.0 authorization dialog or from fast app switching). | |
[FBSession.activeSession handleDidBecomeActive]; | |
} | |
- (void)applicationWillTerminate:(UIApplication *)application | |
{ | |
// Saves changes in the application's managed object context before the application terminates. | |
//[self saveContext]; | |
//PARSE REMOVAL TODO: Close active fb session | |
[[Util sharedInstance].facebookSession close]; | |
} | |
- (BOOL)application:(UIApplication *)application | |
openURL:(NSURL *)url | |
sourceApplication:(NSString *)sourceApplication | |
annotation:(id)annotation { | |
// attempt to extract a token from the url | |
return [[Util sharedInstance].facebookSession handleOpenURL:url]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment