I am trying out adding facebook integration in an app using the new (beta) facebook ios sdk 3.0. All I would like to is post a status update to facebook. I used a FBLoginView to login to facebook. I put my app id in the plist as instructed on facebook. I put in some code to post to facebook. Code: (void)viewDidLoad { [super viewDidLoad]; NSArray *perms; perms = [NSArray arrayWithObjects:@"status_update", nil]; FBLoginView *loginview = [[FBLoginView alloc] initWithPermissions:perms]; loginview.frame = CGRectOffset(loginview.frame, 5, 5); loginview.delegate = self; [self.view addSubview:loginview]; // Do any additional setup after loading the view, typically from a nib. } - (IBAction)poststatus:(UIButton *)sender { NSString *message = [NSString stringWithFormat:@"Test staus update"]; [FBRequestConnection startForPostStatusUpdate:message completionHandler:^(FBRequestConnection *connection, id result, NSError *error) { [self showAlert:message result:result error:error]; }]; } - (void)showAlert:(NSString *)message result:(id)result error:(NSError *)error { NSString *alertMsg; NSString *alertTitle; if (error) { alertMsg = error.localizedDescription; alertTitle = @"Error"; } else { NSDictionary *resultDict = (NSDictionary *)result; alertMsg = [NSString stringWithFormat:@"Successfully posted '%@'.\nPost ID: %@", message, [resultDict valueForKey:@"id"]]; alertTitle = @"Success"; } UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:alertTitle message:alertMsg delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alertView show]; } The odd thing is, this code works ONCE. After authenticating the user for the first time, I can post ONE status update successfully. After that, all subsequent attempts will fail with a FBiOSSDK error 5 (in the console, Error: HTTP status code:400). The only way to fix this is to remove the app from the facebook account and re-authenticate. I'm not sure what the problem is. I looked online for solutions but couldn't find anything. If anyone knows how to fix this, please let me know. Thanks
hmm I downloaded Facebook integration, then just logged in via "mail, contacts, calendars", restarted, and i have been able to update my status via the notification center without a problem... but maybe I'm not understanding what your trying to do.
No, I'm not talking about an error I get when logging onto Facebook in ios6, I'm making an app that integrates with Facebook and I am having trouble making it work..