iOS phonegap-plugin-facebook-connect和Facebook iOS应用程序 [英] iOS phonegap-plugin-facebook-connect vs Facebook iOS Application
问题描述
我一直在尝试 phonegap-plugin-facebook-connect cordova插件简单示例工作,我遇到了一个常见的问题。
- 在我的iPhone上的 Facebook iOS应用程序:
在我的测试应用程序基于简单示例,当我单击登录按钮,它只切换到Facebook iOS应用程序,并切换回我的应用程序。
点击我按钮给我一个错误必须使用活动访问令牌来查询当前用户的信息
auth.login
事件成功 p> 这是一个已知的问题吗?是否有解决方法?
谢谢
我发现了一个解决方法:
在Facebook.m
- void)authorize:(NSArray *)permissions {
self.permissions = permissions;
[self authorizeWithFBAppAuth:NO safariAuth:YES]; //使用Safari Auth而不是FB应用程序
}
未安装或未安装。
I've been trying to make phonegap-plugin-facebook-connect cordova plugin Simple example work, and i've experienced a weired problem.
- First I had the Facebook iOS application on my iphone:
On my test application based on the Simple example, when i click the Login button, it just switches to the Facebook iOS app, and switches back to my application.
Clicking the "Me" button gives me an error "an active access token must be used to query information about the current user"
which means the login was not successful
- Then I removed the Facebook iOS application from my iPhone:
It worked. It opens Safari with Facebook authorisation page, when i click OK it switches back to my application and the auth.login
events are successfully fired.
Is this a known issue ? Is there a way to fix it ?
Thank you
I found a workaround:
in Facebook.m
- (void)authorize:(NSArray *)permissions {
self.permissions = permissions;
[self authorizeWithFBAppAuth: NO safariAuth:YES]; //Use Safari Auth instead of FB App
}
With this workaround Facebook iOS authorization will not be used, wheter installed or not.
这篇关于iOS phonegap-plugin-facebook-connect和Facebook iOS应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!