Sunday, September 12, 2010

Membuat Retweet Button

Versi TweetMeme

The Code

Copy and paste the following code where you want the button to be displayed.

<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>

Options

When the URL is different from the current URL

The button will automatically grab the URL of the page it is placed on. However if you want to place the button on more than one page or would like it in your feed, you will need to override the URL.

<script type="text/javascript"> tweetmeme_url = 'http://yoururl.com'; </script> <script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>

Just replace http://yoururl.com with the URL of the page you want to retweet. The URL must be the final destination URL, not an alias, such as a link using a shortening service (eg. Bit.ly).

Changing the size of the button – Compact Button

The Compact=
The Compact Button

We also offer a compact version of the TweetMeme button, with the same options as the larger button.

<script type="text/javascript"> tweetmeme_style = 'compact'; </script> <script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>

For some common questions, take a look at our FAQ

Changing the @username who is tweeted

By default the retweet button will be in the format of “RT @tweetmeme ”. You can, however change the button to retweet your user account. By specifying the ‘tweetmeme_source’ parameter in the JavaScript you can change the format to “RT @yourname ”.

<script type="text/javascript"> tweetmeme_source = 'tweetmeme'; </script> <script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>

The example above would retweet in the format of “RT @tweetmeme ”.

Changing the URL Shortener used

We have also added the ability to use a URL shortener of your choice instead of our default one. If you would like to do this then you need to include the “tweetmeme_service” parameter as shown below:

<script type="text/javascript"> tweetmeme_service = 'bit.ly'; </script> <script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>

Note: tweetmeme_service should be set to the name of the service you want to use. For some services you also need to include the service API – Please see the example below for this. You will find a list of shortener services available, these incude which need the API keys set, on our URL Shortener page.

<script type="text/javascript"> tweetmeme_service = 'awe.sm'; service_api = '12345678910'; </script> <script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>




Versi Twitter







55x62px

<a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="yourusername">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>




110x20px

<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="yourusername">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>




55x20px

<a href="http://twitter.com/share" class="twitter-share-button" data-count="none" data-via="yourusername">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

No comments:

Post a Comment