facebook 安全警告,而用户​​已启用安全登录 - iPhone [英] facebook Security Warning while user has enabled secure login - iPhone

查看:17
本文介绍了facebook 安全警告,而用户​​已启用安全登录 - iPhone的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个使用 FB 登录的应用程序.对于从 faceBook 登录,我使用的是 FBGraph,如果用户在其帐户中禁用了安全登录,则它可以正常工作,但是如果用户启用了安全登录,则会显示以下消息..

I am working on an application which uses FB login. For login from faceBook I am using FBGraph and it works fine if users have disabled secure login in their account, but if user enables the secure login then it gives following message..

这是我用来登录的代码

self.fbGraph = [[FbGraph alloc] initWithFbClientID:client_id];

    [fbGraph authenticateUserWithCallbackObject:self andSelector:@selector(fbGraphCallback:)
                         andExtendedPermissions:@"user_photos,user_videos,publish_stream,offline_access,user_checkins,friends_checkins"];

根据当前答案的建议,我在 FBGraph.m 中添加了以下代码,但使用此代码,我得到的令牌为零.

From suggestions from current answers, I have added following code in my FBGraph.m But with this code i am getting token nil.

- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType{

    NSLog(@"


request.URL.relativeString = %@


",request.URL.relativeString);
    if([request.URL.relativeString hasPrefix:@"https://www.facebook.com/connect/login_success.html" ]||[request.URL.relativeString hasPrefix:@"http://www.facebook.com/connect/login_success.html" ]||[request.URL.relativeString hasPrefix:@"http://m.facebook.com/connect/login_success.html" ])
    {
        [self.webView stopLoading];
        [[self.webView superview] removeFromSuperview];

        //tell our callback function that we're done logging in :)
        if ( (callbackObject != nil) && (callbackSelector != nil) ) {
            [callbackObject performSelector:callbackSelector];
        }

        return NO;
    }
    return YES;
}

我也变了

self.redirectUri = @"http://www.facebook.com/connect/login_success.html";

self.redirectUri = @"http://m.facebook.com/connect/login_success.html";

但还是没有成功....

But still no success....

请告诉我FB登录的解决方法.....

Please tell me the solution for FB Login.....

谢谢…………

推荐答案

你应该使用 Facebook 的官方 SDK.

You should use Facebook's official SDK.

从这里下载 - Facebook SDK

Facebook

Facebook says

iOS 版 Facebook SDK 3.8 是一个小更新,增加了 XCode 5 和iOS 7 支持、稳定性修复、自动权限刷新和能够为 (FBRequestConnection) 指定批量请求参数.

The Facebook SDK 3.8 for iOS is a minor update that adds XCode 5 and iOS 7 support, stability fixes, automatic permissions refresh and the ability to specify batch request parameters to (FBRequestConnection).

这篇关于facebook 安全警告,而用户​​已启用安全登录 - iPhone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆