1

I have an iPhone IOS 4.3 and iPad IOS 6 apps both using the same code to login a user. FBLoginView work on iPhone with IOS4.3. On my IPad app that use IOS 6 only show the dialog saying the Application would like to access your photos, and post to your friends on your behalf with 2 buttons 'Don't Allow' and 'OK'. I pressed ok but the Facebook stay not logged in.

What other setup do I need ?

Thanks

LittleFunny
  • 8,155
  • 15
  • 87
  • 198
  • Are you using new SDK from here. http://developers.facebook.com/ios/ – Paramasivan Samuttiram Nov 17 '12 at 06:27
  • Yes ... I used FBLoginView inside SDK... – LittleFunny Nov 17 '12 at 06:30
  • Please check the answer of the below two questions, that will help for you. 1. [iOS 6 Facebook posting procedure ends up with “remote_app_id does not match stored id”](http://stackoverflow.com/questions/12671420/ios-6-facebook-posting-procedure-ends-up-with-remote-app-id-does-not-match-stor) 2. [iOS 6 Facebook posting procedure ends up with “remote_app_id does not match stored id” error](http://stackoverflow.com/questions/12644229/ios-6-facebook-posting-procedure-ends-up-with-remote-app-id-does-not-match-stor) – Paramasivan Samuttiram Nov 17 '12 at 22:24
  • Thanks i will look at it later after I finished other thing. – LittleFunny Nov 20 '12 at 23:31

3 Answers3

1

For me the problem was because I was using offline_access.

I had following code:

FBLoginView *loginView = [[FBLoginView alloc] initWithReadPermissions:
             [NSArray arrayWithObjects:@"offline_access", @"email", nil]];

The error went away after changing to:

FBLoginView *loginView = [[FBLoginView alloc] initWithReadPermissions:
             [NSArray arrayWithObjects:@"email", nil]];

More details on offline_access here: https://developers.facebook.com/roadmap/offline-access-removal/

ddiego
  • 3,247
  • 1
  • 28
  • 18
0

As per the documentation, login can be done using the following code. Put NSLog inside to get error.

[FBSession openActiveSessionWithReadPermissions:[NSArray arrayWithObjects:@"read_stream", nil] allowLoginUI:YES
                              completionHandler:^(FBSession *session,
                                                  FBSessionState status,
                                                  NSError *error) {
                                  // session might now be open.
                                  NSLog(@"Error - %@", error);
                              }]
Paramasivan Samuttiram
  • 3,728
  • 1
  • 24
  • 28
0

Ok, instead of FBLoginView, for now, use the below method to trace out the error. Then, you can switch back to FBLoginView.

[FBSession openActiveSessionWithReadPermissions:[NSArray arrayWithObjects:@"read_stream", nil] allowLoginUI:YES
                              completionHandler:^(FBSession *session,
                                                  FBSessionState status,
                                                  NSError *error) {
                                  // session might now be open.
                                  NSLog(@"Error - %@", error);
                              }]
Paramasivan Samuttiram
  • 3,728
  • 1
  • 24
  • 28
  • Error - Error Domain=com.facebook.sdk Code=2 "The operation couldn’t be completed. (com.facebook.sdk error 2.)" UserInfo=0xb371320 {com.facebook.sdk:ErrorLoginFailedReason=com.facebook.sdk:ErrorLoginFailedReason, com.facebook.sdk:ErrorInnerErrorKey=Error Domain=com.apple.accounts Code=7 "The Facebook server could not fulfill this access request: no stored remote_app_id for app" UserInfo=0xa76aab0 {NSLocalizedDescription=The Facebook server could not fulfill this access request: no stored remote_app_id for app}} – LittleFunny Nov 17 '12 at 22:20