(617) 433-7483 Servicing Boston & Surrounding Areas

Create your own Tweet button

March 13, 2013

Create your own Tweet button

Posted by with - in Web Design

When creating a site very often we wish for adding social network buttons through which users can share what they found interesting in our site.

However, very often the standard buttons offered by social networks seem rather unattractive, because they spoil the whole design of the site.

And here the best possible approach is to replace the standard form of buttons with our own, that will fit the “landscape” of our website.

So, if the thing is about the button to social microblog Twitter and if you are not satisfied with the design, which is offered by default, let’s create our own, one that will suit us.

First we need to define the link URL that transmits our tweet, it looks like:

http://twitter.com/intent/tweet?status = “Here, the content of our tweet should not exceed 140 characters”

But Cyrillic in variable status in the link should be recoded from Cyrillic to Unicode, therefore, the link will look like:

http://twitter.com/intent/tweet?status = <? = iconv (“cp1251”, “UTF-8”, “Here the content of our tweet should not exceed 140 characters”)?>

Adding beauty with CSS or beautiful button, we get the code of our button:

<a href = “http://twitter.com/intent/tweet?status = <? = iconv (” cp1251 “,” UTF-8 “,” Site http://rapidup.ru/ – help for webmasters! ” )?> “target =” _blank “> <img src=”http://rapidup.ru/img/twitter_button.png” border=”0″> </ a>

Comments are closed.