开发者

Facebook connect button

I can't seem to find how to generate the classic Facebook Connect button:

Facebook connect button

all I can find how to generate is the following:

Facebook connect button


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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜