2

Using Facebook's FBML login button, is it possible to use custom login/logout images?

<fb:login-button 
    autologoutlink="true" 
    onlogin="OnRequestPermission();">
</fb:login-button>
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Dave
  • 25
  • 1
  • 8

4 Answers4

6

Yes, it is possible, using the JavaScript version:

<a href="#" id='fb-connect-link' onclick="FB.Facebook.init(api_key, channel_path);FB.Connect.requireSession();return false;">
            <img src="/media/default/img/button_facebook.png" alt="F" /><br />Facebook<br />(via Connect)</a>

I used this before and it works.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Nealv
  • 6,856
  • 8
  • 58
  • 89
  • :) if it hasn't changed in the meantime that is, facebook has some strange policies about changing it's api's – Nealv Aug 06 '10 at 13:53
3

Nealv's answer demonstrates old API. If you want to use new API then you need to call FB.login() method to trigger fb login dialog at any point.

serg
  • 109,619
  • 77
  • 317
  • 330
1

Nope that's not possible, Facebook does not allow that because of its branded icon/image.

If however, you are using JavaScript for that, see the answer of @Nealv.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Sarfraz
  • 377,238
  • 77
  • 533
  • 578
1

Head over to this answer, I have already explained this and also provided the code. Let me know if it still needs further clarification.

Sachin!

Source : How to change facebook login button with my custom image

Community
  • 1
  • 1
Sachin Khosla
  • 1,716
  • 1
  • 10
  • 11