Created
February 19, 2010 21:24
-
-
Save facebook/309234 to your computer and use it in GitHub Desktop.
This file contains 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
#import "MyViewController.h" | |
#import "HelloWorldAppDelegate.h" | |
#import "FBConnect/FBConnect.h" | |
static NSString* kApiKey = @"YOUR_API_KEY"; | |
static NSString* kApiSecret = @"YOUR_API_SECRET"; | |
@implementation HelloWorldAppDelegate | |
@synthesize window; | |
@synthesize myViewController; | |
/////////////////////////////////////////////////////////////////////////////////////////////////// | |
// ui app delegate | |
- (void)applicationDidFinishLaunching:(UIApplication *)application { | |
_session = [[FBSession sessionForApplication:kApiKey secret:kApiSecret delegate:self] retain]; | |
[_session resume]; | |
MyViewController *aViewController = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:[NSBundle mainBundle]]; | |
[self setMyViewController:aViewController]; | |
[aViewController release]; | |
UIView *controllersView = [myViewController view]; | |
[window addSubview:controllersView]; | |
[window makeKeyAndVisible]; | |
} | |
- (void)dealloc { | |
[myViewController release]; | |
[window release]; | |
[super dealloc]; | |
} | |
/////////////////////////////////////////////////////////////////////////////////////////////////// | |
// FBSessionDelegate | |
- (void)session:(FBSession*)session didLogin:(FBUID)uid { | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://m.facebook.com/login/identify/?ctx=recover&search_attempts=1&alternate_search=0&show_friend_search_filtered_list=0&birth_month_search=0&city_search=0
© 2021 GitHub, Inc.