Note that there are some explanatory texts on larger screens.

plurals
  1. POUnable to implement facebook integration in iphone app
    primarykey
    data
    text
    <p>I am working on iphone facebook application. I am going through facebook connect tutorial on developer.facebbok.com. I did perfectly what mentioned in tutorial. But as per the tutorial there are log in and cancel button showing and in my application only "Okay" button showing on the right side of top bar. What is wrong happening here? Flow is like this. 1. Tap on tableview cell 2. Open facebookcontroller. 3. In view did load method of facebookcontroller I added tutorial code.</p> <p><strong>MyConnectViewController.m</strong></p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; facebook = [[Facebook alloc]initWithAppId:@"353076241375240" andDelegate:self]; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; if ([defaults objectForKey:@"FBAccessTokenKey"] &amp;&amp; [defaults objectForKey:@"FBExpirationDateKey"]) { facebook.accessToken = [defaults objectForKey:@"FBAccessTokenKey"]; facebook.expirationDate = [defaults objectForKey:@"FBExpirationDateKey"]; } if (![facebook isSessionValid]) { [facebook authorize:nil]; } // Do any additional setup after loading the view, typically from a nib. } - (void) fbDidLogout { // Remove saved authorization information if it exists NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; if ([defaults objectForKey:@"FBAccessTokenKey"]) { [defaults removeObjectForKey:@"FBAccessTokenKey"]; [defaults removeObjectForKey:@"FBExpirationDateKey"]; [defaults synchronize]; } } - (void)fbDidLogin { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setObject:[facebook accessToken] forKey:@"FBAccessTokenKey"]; [defaults setObject:[facebook expirationDate] forKey:@"FBExpirationDateKey"]; [defaults synchronize]; } </code></pre> <p><strong>MyConnectAppDelegate.m</strong></p> <pre><code>- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { return [[_viewController facebook] handleOpenURL:url]; } </code></pre> <p>I want to start from login screen of facebook.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload