views:

103

answers:

2

Hi folks,

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? :)

A: 

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

Gintautas Miliauskas
+2  A: 

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>
diegueus9
how do I change the look and feel of the button on there?
RadiantHex
@RadiantHex - Where he put `<img src="you image url here" />`, just put whatever Facebook connect image you want there.
Matt Huggins
excellent thanks so much for the edit! =)
RadiantHex
is there any way to recognize if the user is logged in or not? :)
RadiantHex
http://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus
diegueus9