用于电子邮件的Facebook(JavaScript)权限对话框 - 错误 [英] Facebook (JavaScript) permission dialog for email - Error

本文介绍了用于电子邮件的Facebook(JavaScript)权限对话框 - 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用FB JavaScript SDK开发Facebook应用程序。我在使用OAuth对话框的应用程序开始时需要电子邮件权限。以下是代码:

 < 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屋!

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