javascript - Facebook Login auth dialog and permissions - Stack Overflow

I've set required permissions for my app in "SettingsAuth dialog". However they doesn&#

I've set required permissions for my app in "Settings/Auth dialog". However they doesn't show up when I add generic login button

  <div id="fb-root"></div>
  <script>
    window.fbAsyncInit = function() {
      FB.init({
        appId      : 'xxx',
        status     : true, 
        cookie     : true,
        xfbml      : true
      });
    };
    (function(d){
       var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
       js = d.createElement('script'); js.id = id; js.async = true;
       js.src = "//connect.facebook/en_US/all.js";
       d.getElementsByTagName('head')[0].appendChild(js);
     }(document));
  </script>
  <div class="fb-login-button">Login with Facebook</div>

I've set required permissions for my app in "Settings/Auth dialog". However they doesn't show up when I add generic login button

  <div id="fb-root"></div>
  <script>
    window.fbAsyncInit = function() {
      FB.init({
        appId      : 'xxx',
        status     : true, 
        cookie     : true,
        xfbml      : true
      });
    };
    (function(d){
       var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
       js = d.createElement('script'); js.id = id; js.async = true;
       js.src = "//connect.facebook/en_US/all.js";
       d.getElementsByTagName('head')[0].appendChild(js);
     }(document));
  </script>
  <div class="fb-login-button">Login with Facebook</div>
Share Improve this question asked Oct 25, 2011 at 16:42 user986654user986654 2153 silver badges9 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

You need to put a "data-perms" attribute in your fb-login-button class div. Here's what I mean:

<div class="fb-login-button" data-perms="email,user_checkins">
        Login with Facebook
</div>

Here's a link to the facebook doc page that will tell you all about it: https://developers.facebook./docs/guides/web/

The code I just pasted in there is about halfway down the page. They show you exactly what you need to do to make the login and permissions work.

Hope that helps!

-Kyle

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745330410a4622850.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信