Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to customize a Facebook Send Button?

Tags:

facebook

I'm trying to customize the appearance of a facebook 'Send' button.

I generate the button using the code provided in the docs, however I don't have a clue of how I could modify the button's image or text ?

Could anyone give me an example? I guess javascript is my only option here?

My code looks like this right now:

<fb:send href="http://www.mywebsite.com/something"></fb:send> 

This generates a button that looks like this:

enter image description here

Thanks!

like image 625
Goles Avatar asked Jun 19 '12 03:06

Goles


1 Answers

You cannot customise the <fb:send /> button. However, you can achieve the same functionality using FB.ui (http://developers.facebook.com/docs/reference/javascript/FB.ui/). Use the send method, eg.

FB.ui({
    method: 'send',
    name: 'People Argue Just to Win',
    link: 'http://www.nytimes.com/2011/06/15/arts/people-argue-just-to-win-scholars-assert.html',
});
like image 79
Gajus Avatar answered Oct 08 '22 12:10

Gajus