如何使用新的 Facebook Connect iOS API 通过 DIALOG 授权用户? [英] How to authorize user through a DIALOG with the NEW Facebook Connect iOS API?

查看:21
本文介绍了如何使用新的 Facebook Connect iOS API 通过 DIALOG 授权用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我明白 - http://developers.facebook.com/docs/guides/mobile/#ios - 看起来很有用,但我的应用程序不支持多任务处理,所以这种cross safari"方法对我不起作用.

I understand - http://developers.facebook.com/docs/guides/mobile/#ios -, seems really useful, but my app won't support multitasking, so this "cross safari" method won't work for me.

某处是否有一个简短的例子(或者有人可以在这里复制)一个通过 FBDialogs 的身份验证过程(使用这个所谓的新"API)?我刚开始了解这个 SDK,所以请尽可能简单.

Is there a brief example somewhere (or can someone please copy here) an authentication process trough FBDialogs (with this so called "new" API)? I'm just getting know this SDK, so please as basic as you can.

推荐答案

努力解决了几个小时...

Struggled to figure this out for a couple of hours...

这里是绕过fb app|background-safari认证的解决方法,在Facebook.m里改就行了:

Here is the solution to bypass fb app|background-safari authentication, and it is just to change in Facebook.m:

[self authorizeWithFBAppAuth:YES safariAuth:YES]

[self authorizeWithFBAppAuth:NO safariAuth:NO]

在方法中:

- (void)authorize:(NSArray *)permissions
     delegate:(id<FBSessionDelegate>)delegate

.

使用示例代码进行验证,无需更改任何其他内容(当然将 kAppId 设置为您的)

Verified it with the sample code without changing anything else (of course set kAppId to yours)

我很生气,为什么 FB 没有记录这个......

I was quite mad why on earth FB doesn't document this...

希望能帮到你,

干杯

这篇关于如何使用新的 Facebook Connect iOS API 通过 DIALOG 授权用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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