开发者

Facebook login button does not display when requesting extended permissions

I have a site which used the following code to prompt the user for extended permissions after they logged in using Facebook on the site.

<fb:login-button show-faces="false" perms="publish_stream,email,user_location,offline_access" width="200" max-rows="1"></fb:login-button>

This worked fine and the user was able to see the FB Login button to accept the extended permissions. However just recently, a few days ago, the FB Login button for extended permis开发者_如何转开发sions is not showing up now.

The only way to make it show up is to log out of Facebook and then go back to log in.


user912551

For login scope i am using the new javascript sdk with oauth 2.0. You may need to enable oauth 2 in your app settings to use.

<div id="fb-root"></div>
<script>
      window.fbAsyncInit = function() {
        FB.init({
    appId  : '135669679827333',
    status : true, // check login status
    cookie : true, // enable cookies to allow the server to access the session
    xfbml  : true, // parse XFBML
    //channelUrl : 'http://WWW.MYDOMAIN.COM/channel.html', // channel.html file
    oauth  : true // enable OAuth 2.0
        });
      };
      (function() {
        var e = document.createElement('script'); e.async = true;
        e.src = document.location.protocol +
          '//connect.facebook.net/en_US/all.js';
        document.getElementById('fb-root').appendChild(e);
      }());
</script>
Test Login Button.
<fb:login-button show-faces='false' scope='email,publish_stream,user_birthday,user_location'></fb:login-button>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜