Skip to content

Instantly share code, notes, and snippets.

@BenBarahona
Created November 10, 2012 01:14
Show Gist options
  • Save BenBarahona/4049375 to your computer and use it in GitHub Desktop.
Save BenBarahona/4049375 to your computer and use it in GitHub Desktop.
AppDelegate modifications for Facebook SDK
- (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