1

I'm struggling to submit an Android/iOS application to App Center, however I'm getting constantly rejected with the following reason:

General Feedback:

  • Your Android app does not appear to have Facebook Login integration. Please either implement Facebook Login or remove this integration as a listed platform in the developer app. See more details here
  • Your iOS app does not appear to have Facebook Login integration. Please either implement Facebook Login or remove this integration as a listed platform in the developer app. See more details here

Facebook login button is placed in Settings dialog, where a normal email/password login is located as well.

Unfortunately the review team doesn't specify why exactly it appears to them that Facebook Login integration is missing.

So, are there any specific requirements on Login implementation which I may be missing?

4

4 回答 4

0

好的,有助于通过审核的一件事是在“设置”屏幕的登录按钮上添加 Facebook 徽标。

于 2013-09-12T00:36:09.573 回答
0

我不使用登录按钮。相反,在 appdelegate 中有一个 make 函数来获取 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];
}
}

希望这可以帮助!

于 2013-07-02T18:41:20.697 回答
0

查看Facebook 开发人员页面- 他们在此处概述了如何开始将 Facebook 集成到 Android 应用程序中,在此处讨论 Facebook 身份验证,并此处提供 Facebook 登录教程。也许您的问题不符合概述的要求,因此您有登录名,但格式不正确。

于 2013-06-27T13:27:53.273 回答
-2

Facebook 有自己的开发者指南,您可以在此处找到:https ://developers.facebook.com/docs/appcenter/guidelines/ 。几乎在文档的末尾,您有一个名为“常见提交错误”的部分。检查它,点击链接,也许你可以找到你的问题所在。

希望这可以帮助!

于 2013-07-03T08:18:58.370 回答