Facebook connect button
I can't seem to find how to generate the classic Facebook Connect button:
all I can find how to generate is the following:
I'm using the documentati开发者_StackOverflow社区on here http://developers.facebook.com/docs/guides/web
Any ideas? :)
http://developers.facebook.com/docs/reference/plugins/login
If you wanna change the image you must doing manually:
<div id='login'><a href="#" id='facebook-login' onclick='fblogin();'><img src="your image url here" /></a></div>
</a>
<script>
function fblogin(){
FB.login(function(response) {
if (response.session) {
if (response.perms) {
// user is logged in and granted some permissions.
// perms is a comma separated list of granted permissions
window.location.reload();
} else {
// user is logged in, but did not grant any permissions
window.location.reload();
}
} else {
// user is not logged in
window.location.reload();
}
}, {perms:'email'});
return false;
}
</script>
"Connect with Facebook" is simply an earlier design of the same button. If you really want to use that, you could fetch the code for "Login with Facebook", adjust it to look like "Connect with Facebook" and put it inline, but I would recommend against it, as such a solution is fragile and will break when Facebook changes something on their side.
精彩评论