A bit inconvenient, but the best way I know is to use <fb:login-button> to generate the button, and then use css to place the empty div directly on top of it. Then you can bind the onclick handler to the div, which will be redirected to the URL of your choice. The size of the div should be determined approximately to the height and width of the button, which you do not know in advance, but you can either just go "close enough" or do some javascript to dynamically set the size of the div after the button is displayed. In most cases, the login button does not overlap other elements, so no one will notice if the click area is a bit larger than the button itself.
Edit: some code examples are likely to make this clearer. The first is a fixed-size version, which is likely to work in most cases:
<div style="position:relative"> <fb:login-button></fb:login-button> <div style="position:absolute;left:0;top:0;width:70px;height:20px;cursor:pointer" onclick="location.href='https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&scope=email,read_stream'"></div> </div>
And also a version of the dynamic size that should work, but has not been tested in all browsers:
<span style="position:relative"> <fb:login-button></fb:login-button> <a href="https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&scope=email,read_stream"><span style="position:absolute;width:100%;height:100%;left:0;top:0;font-size:200px;overflow:hidden"> </span></a> </span>
source share