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
1 Answer
Reset to default 7You 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条)