친구 벽에 링크를 공유하기 위해 iOS 앱에 Facebook sdk 3.1을 사용했습니다. 나는 페이스 북은 게시 할 수 없습니다 때문에 추가 오류 "작업을 완료 할 수 없습니다"com.facebook.sdk 오류 2를 반환하고 계정의 일부iOS 로그인 문제의 Facebook SDK 3.1
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
myAppDelegate = self;
AudioViewController *viewController = [[AudioViewController alloc] init];
self.navController = [[UINavigationController alloc] initWithRootViewController:viewController];
[self.navController setNavigationBarHidden:YES];
viewController = nil;
self.window.rootViewController = self.navController;
[self.window makeKeyAndVisible];
if (![self openSessionWithAllowLoginUI:NO]) {
// No? Display the login page.
[self performSelector:@selector(login) withObject:nil afterDelay:0.5];
}
return YES;
}
- (void)login{
[self openSessionWithAllowLoginUI:YES];
}
- (BOOL)openSessionWithAllowLoginUI:(BOOL)allowLoginUI {
return [FBSession openActiveSessionWithReadPermissions:nil
allowLoginUI:allowLoginUI
completionHandler:^(FBSession *session, FBSessionState state, NSError *error) {
[self sessionStateChanged:session state:state error:error];
}];
}
- (void)sessionStateChanged:(FBSession *)session
state:(FBSessionState)state
error:(NSError *)error{
switch (state) {
case FBSessionStateOpen: {
DLOG(@"session open");
}
break;
case FBSessionStateClosed: {
DLOG(@"session closed");
[FBSession.activeSession closeAndClearTokenInformation];
}
break;
case FBSessionStateClosedLoginFailed: {
DLOG(@"session Failed");
}
break;
default:
break;
}
[[NSNotificationCenter defaultCenter] postNotificationName:WVSessionStateChangedNotification
object:session];
if (error) {
DLOG(@"error = %@",error);
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:@"Error: %@",
[AppDelegate FBErrorCodeDescription:error.code]]
message:error.localizedDescription
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alertView show];
}
}
아래로 아래 applicationDidFinishLaunching 메소드에서 새 세션을 열려고 페이스 북에서.
여기에 뭔가 잘못하고 있습니까? 도움이 될 것입니다.
로그인 중에이 오류가 발생합니까? –
는 u는 당신이 오프 주제 –
페이스 북의 로그인되어보기에서 페이스 북의 메소드를 추가 않았지만, API를 통해 친구의 벽에 게시가 사용되지 않으며 2 월 6 일 이후에 사용할 수 없습니다, 2013 –