成功提交给App Center的“Facebook登录整合”要求是什么?

问题描述:

我挣扎提交的Android/iOS的应用程序应用中心,但我越来越经常有以下原因拒绝:成功提交给App Center的“Facebook登录整合”要求是什么?

一般反馈:

  • 您的Android应用程序不会似乎没有Facebook登录集成。请实施Facebook登录或将此集成作为开发人员应用程序中列出的平台移除。在这里看到更多的细节
  • 你的iOS应用程序似乎没有Facebook登录整合。请实施Facebook登录或将此集成作为开发人员应用程序中列出的平台移除。查看更多详细信息,在这里

Facebook登录按钮被放置在设置对话框,在一个正常的电子邮件/密码登录所在也。

不幸的是,审查团队没有具体说明为什么他们觉得Facebook登录集成缺失。

那么,有没有我可能会失踪的登录实施的具体要求?

好的,帮助传递审查的一件事是在设置屏幕中的登录按钮上添加Facebook徽标。

回顾Facebook developers page - 他们概述了如何开始使用Facebook的整合到Android应用here说明,谈论Facebook验证here,并有一个Facebook登录here的教程。也许你的问题没有遵循概述的要求,所以你有登录,但没有适当的格式。

+0

我已阅读并遵循所有这些说明,唯一的区别是: 由于我使用PreferenceActivity来进行应用程序设置,包括用户身份验证,我实现了一个具有所有“LoginButton”功能的定制'Preference'(处理'Session',等等)而不是把'LoginButton'放在那里,这看起来真的不合适。 因此,问题是,我是否需要混淆现有的应用程序布局,并在第一个屏幕上放置一个大的Facebook LoginButton,即使用户甚至不需要登录即可开始使用该应用程序? –

+0

我相信你需要改变布局(也许在开放屏幕上你可以有你的二级登录选项?) - 但是,我不确定所以我为你的问题+1了希望它获得更多的牵引力 –

+0

我不知道这个统计数字是什么,但它可能更容易,只是做FB登录,因为很多人使用它,但我不确定你的实现是什么,所以也许你的二级登录是必要的 –

我不使用登录按钮。相反,在appdelegate中创建一个函数来获取FBSession。

- (BOOL)openSessionWithAllowLoginUI:(BOOL)allowLoginUI andCompletionBlock:(void (^)(void)) action{ 
BOOL theResult = [FBSession openActiveSessionWithPublishPermissions:[NSArray arrayWithObject:@"publish_actions"] defaultAudience:FBSessionDefaultAudienceFriends allowLoginUI:allowLoginUI 
               completionHandler:^(FBSession *session, 
                    FBSessionState state, 
                    NSError *error) { 
                if (state == FBSessionStateOpen) { 
                 action(); 
                } 
                //action(); 
                [self sessionStateChanged:session 
                     state:state 
                     error:error]; 
               }]; 
return theResult; 
} 

然后当我要发布,我这样做:

if (!FBSession.activeSession.isOpen) { 
    [theAppDelegate openSessionWithAllowLoginUI:YES andCompletionBlock:^{ 
    //Your Code    
     [self postToWall]; 

    }]; 
} 
else { 
     [self postToWall]; 
} 

- (void) performPublishAction:(void (^)(void)) action { 
// we defer request for permission to post to the moment of post, then we check for the permission 
if ([FBSession.activeSession.permissions indexOfObject:@"publish_actions"] == NSNotFound) { 
    [FBSession.activeSession requestNewPublishPermissions:[NSArray arrayWithObject:@"publish_actions"] 
               defaultAudience:FBSessionDefaultAudienceFriends 
              completionHandler:^(FBSession *session, NSError *error) { 
               if (!error) { 
                action(); 
               } 
              }]; 
     } else { 
      action(); 
    } 
} 

    -(void)postToWall { 
[self performPublishAction:^{ 
    NSMutableDictionary* params1 = [NSMutableDictionary dictionaryWithObjectsAndKeys: 
            kFacebookAppID, @"api_key", 
            kLink,   @"link", 
            photo,   @"picture", 
            kAppName,  @"name", 
            kDescription, @"description", 
            nil]; 

    FBRequestConnection *connection = [[FBRequestConnection alloc] init]; 
    FBRequest *theRequest = [[FBRequest alloc] initWithSession:[FBSession activeSession] graphPath:@"me/photos" parameters:params1 HTTPMethod:@"POST"]; 
    [connection addRequest:theRequest completionHandler:^(FBRequestConnection *connection, id result, NSError *error) { 
     NSLog(@"Result from Facebook request: %@",result); 
     if (!error) { 
      [[NSNotificationCenter defaultCenter] postNotificationName:@"UploadComplete" object:nil]; 
     } 
     else 
     { 

     } 
    }]; 
    [connection start]; 

}]; 
} 

添加这些功能为好。

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { 
// attempt to extract a token from the url 
return [FBSession.activeSession handleOpenURL:url]; 
} 

/* 
* Callback for session changes. 
*/ 
- (void)sessionStateChanged:(FBSession *)session state:(FBSessionState) state error:(NSError *)error 
{ 
switch (state) { 
    case FBSessionStateOpen: 
     if (!error) { 
      // We have a valid session 
      NSLog(@"User session found"); 
     } 
     break; 
    case FBSessionStateClosed: 
    case FBSessionStateClosedLoginFailed: 
     [FBSession.activeSession closeAndClearTokenInformation]; 
     break; 
    default: 
     break; 
} 

[[NSNotificationCenter defaultCenter] 
postNotificationName:FBSessionStateChangedNotification 
object:session]; 

if (error) { 
    UIAlertView *alertView = [[UIAlertView alloc] 
           initWithTitle:@"Error" 
           message:error.localizedDescription 
           delegate:nil 
           cancelButtonTitle:@"OK" 
           otherButtonTitles:nil]; 
    [alertView show]; 
} 
} 

希望这有助于!

+0

它通过Facebook审查? –

+0

这个应用程序实现了它没有去到appstore,喜欢在这里指出,当我张贴到Facebook时,用户选择按Post to facebook按钮。 –

+0

我的应用程序没有发布任何内容到Facebook,它只是使用Facebook登录,而不是手动输入电子邮件和密码 –

Facebook有自己的开发者指南,你可以在这里找到:https://developers.facebook.com/docs/appcenter/guidelines/。几乎在文档结尾处有一个部分,即“常见提交错误”。检查它,按照链接,也许你可以找到你的问题。

希望这会有所帮助!

+0

与我的问题相关的唯一短语是: “为iOS和Android构建的移动应用程序必须使用Facebook登录。” 问题仍然存在:“使用Facebook登录”的要求是什么? –