Facebook权限对话框(JavaScript sdk) [英] Facebook permission dialog (JavaScript sdk)
问题描述
我使用OAuth对话框获取Facebook权限,以访问用户的电子邮件,生日和其他详细信息,但是当我运行这个应用程序URL https://apps.facebook.com/projectatestapp/
(当登录到Facebook时)我看到这个登录到应用程序窗口,该窗口说:
I am using OAuth Dialog for Facebook permission to access a users' email, birthday and other details but when I run this app URL that is https://apps.facebook.com/projectatestapp/
(while being logged into Facebook) I see this login to app window which says:
您正在登录到testapp作为尼娜·塞瓦特登录将不会将此应用程序的活动添加到Facebook。
You are logging into testapp as Nina Sewart. Logging in will not add this app's activity to Facebook.
使用登录并取消按钮而不是权限窗口允许和不允许按钮
这是我的代码
<html xmlns:fb="https://www.facebook.com/2008/fbml">
<body>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<div id="fb-root"></div>
<script>
FB.init({
appId: '[My app id]',
xfbml: true,
cookie: true,
oauth: true
});
FB.login({
scope: 'email,user_birthday',
});
</script>
<a href="https://www.facebook.com/dialog/oauth/?scope=email,
user_birthday&
client_id=148244388606048&
redirect_uri=https://apps.facebook.com/projectatestapp/test2.html&
response_type=token" target="_top">test</a>
</body>
</html>
请告诉我错了什么?
推荐答案
您没有看到的原因是因为应用程序进程已经成为两步。
The reason you are not seeing it is because the application process has become a two step process.
- 该人接受登录您的申请。
- 许可是回叫网址发生的地方。
可以找到文档此处。
所以你的回调没有被调用的原因是因为两步过程。我建议将响应附加到被调用的第二页。
So the reason your callback isn't being called is because the two step process. I would suggest making the response attached to second page that is called.
我不知道JS SDK如何工作,但我是如何设法完成的。
I am not sure how the JS SDK works but it is how I managed to do it.
Goodluck。
这篇关于Facebook权限对话框(JavaScript sdk)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!