用于电子邮件的Facebook(JavaScript)权限对话框 - 错误 [英] Facebook (JavaScript) permission dialog for email - Error
问题描述
< 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:'*************',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>试验< / A>
< / body>
< / html>
但是当我点击URL https://apps.facebook.com /projectatestapp/test2.html
,我看到测试链接。当我点击链接一些屏幕闪烁,然后我被定向到Facebook页面上放置一个大的Facebook按钮,当我点击那个大的fb图标按钮,然后我看到权限窗口
现在我不知道我做错了什么,因为我不想看到我的应用程序权限窗口中的大fb按钮。如何跳过?
将 target =_ top
属性添加到您的链接< a>
,这样链接将在顶层窗口中打开,而不是在iframe中。
I am developing a Facebook application with FB JavaScript SDK. I need email permission on start of the application I am using OAuth Dialog. Here is the code:
<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>
// assume we are already logged in
FB.init({appId: '*************', 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"> test</a>
</body>
</html>
But when I hit the URL https://apps.facebook.com/projectatestapp/test2.html
, I see the test link. When I click at link some screen flashes and then I am directed to the Facebook page On which a big Facebook button is placed and when I click on that big fb icon button then I see the permission window
Now I dont know what I ma doing wrong as I dont want to see the big fb button in process of my application permission window. How to skip it?
Add the target="_top"
attribute to your link <a>
, this way the link will open on the top window instead of within the iframe.
这篇关于用于电子邮件的Facebook(JavaScript)权限对话框 - 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!