Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/122.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 奇怪的facebook授权异常_Ios_Facebook_Facebook Ios Sdk - Fatal编程技术网

Ios 奇怪的facebook授权异常

Ios 奇怪的facebook授权异常,ios,facebook,facebook-ios-sdk,Ios,Facebook,Facebook Ios Sdk,最近,我通过facebook将授权集成到我的应用程序中 我的授权代码: AppDelegate *mainDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate]; if (!mainDelegate.session || mainDelegate.session.state != FBSessionStateCreated) { mainDelegate.session = [[FBSession al

最近,我通过facebook将授权集成到我的应用程序中

我的授权代码:

AppDelegate *mainDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];

if (!mainDelegate.session || mainDelegate.session.state != FBSessionStateCreated)
{
    mainDelegate.session = [[FBSession alloc] initWithPermissions:[NSArray arrayWithObjects:@"email", @"offline_access", @"user_birthday", @"user_photos", @"publish_actions", @"publish_stream", @"read_stream", nil]];

}

[mainDelegate.session openWithCompletionHandler:^(FBSession *session,
                                                  FBSessionState status,
                                                  NSError *error)
{
    FBSession.activeSession = session;
    if(mainDelegate.session.isOpen)
    {
        //getting access token
    }
}];
但在此之后,我收到:

    FBSDKLog: Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0x17e5aa80 {com.facebook.sdk:HTTPStatusCode=400, com.facebook.sdk:ParsedJSONResponseKey={
        body =     {
            error =         {
                code = 100;
                message = "(#100) The parameter 'custom_events' or 'custom_events_file' is required for the 'CUSTOM_APP_EVENTS' activity";
                type = OAuthException;
            };
        };
        code = 400;
        headers =     (
                    {
                name = "Access-Control-Allow-Origin";
                value = "*";
            },
                    {
                name = "Cache-Control";
                value = "no-store";
            },
                    {
                name = Connection;
                value = close;
            },
                    {
                name = "Content-Type";
                value = "text/javascript; charset=UTF-8";
            },
                    {
                name = Expires;
                value = "Sat, 01 Jan 2000 00:00:00 GMT";
            },
                    {
                name = Pragma;
                value = "no-cache";
            },
                    {
                name = "WWW-Authenticate";
                value = "OAuth \"Facebook Platform\" \"invalid_request\" \"(#100) The parameter 'custom_events' or 'custom_events_file' is required for the 'CUSTOM_APP_EVENTS' activity\"";
            },
                    {
                name = "x-fb-loadmon";
                value = "0,49.16,50";
            }
        );
    }, com.facebook.sdk:ErrorSessionKey=<FBSession: 0x17eac610, state: FBSessionStateOpen, loginHandler: 0x17eeb1d0, appID: 123456789012345, urlSchemeSuffix: , tokenCachingStrategy:<FBSessionTokenCachingStrategy: 0x17ecef60>, expirationDate: 2014-01-07 10:09:59 +0000, refreshDate: 2013-11-08 10:28:09 +0000, attemptedRefreshDate: 0001-12-30 00:00:00 +0000, permissions:(
        email,
        "offline_access",
        "user_birthday",
        "user_photos",
        "publish_actions",
        "publish_stream",
        "read_stream"
    )>}
我禁用了此处提供的Install Insights和Mobile SDK Insights:但我仍然看到此错误 我一周前禁用了insights,所以服务器已经更新了设置

但尽管有这个错误,授权工作正常,我成功地获得了访问令牌和所有需要的数据。 但我担心这一点,如果这个错误在将来会带来问题的话。 我怎样才能避免这种情况?为什么会出现此错误