Question

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

alt text

all I can find how to generate is the following:

alt text


I'm using the documentation here http://developers.facebook.com/docs/guides/web


Any ideas? :)

Was it helpful?

Solution

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>

OTHER TIPS

"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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top