Highly customizable Twitter trackbacks widget to integrate tweets that mention
your post into your blog. Each tweet comes with reply & retweet
links to get more readers engaged in your story conversation.
After Topsy has released a
Wordpress plugin to turn
your post tweets into comments. I wanted to use their awesome API to create this
Javascript widget that can be used for any blog especially for non-Wordpress
ones.
Additionally, Topsy Wordpress plugin gives you a retweet button that I covered
how to embed it using Javascript only.
Now Check out these DEMOS.. or See it in ACTION by the end of this post!
Each one links to the demo page where you can see HTML & CSS & JS you need to embed... CSS code is essential but I'm not going to focus on it here.
Demo 1: Trackbacks Bar ►
This is the default behavior of this plugin. A trackbacks bar!
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript"
src="http://twitter-trackbacks-widget.googlecode.com/files/jquery.twittertrackbacks-1.0.min.js"></script>
<div class="twitter-trackbacks">loading..</div>
Use CSS as in demo page then include jQuery and plugin JS and add a div with a "twitter-trackbacks" class and it will be auto-loaded!
Link URL will be automatically grabbed from the page it is placed in.
Demo 2: Triple Trackbacks Bar ►
Few options were changed here, by placing a comma delimited array of arguments in 'options' attribute of the Div element..
<script
type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script
type="text/javascript" src="http://twitter-trackbacks-widget.googlecode.com/files/jquery.twittertrackbacks-1.0.min.js"></script>
<div class="twitter-trackbacks" options="{
url:'http://www.moretechtips.net/2009/10/twitter-friends-followers-widget-jquery.html'
,n:9
,show_n:3
,stay_time:8000
,animate:'height'
,inf_only:1
,inf_tip:1
}">loading..</div>
'url' was manually set.
Limited the number of tweets to return 'n' to 9 only.
Increased number of tweets to show 'show_n' to 3.
Changed the time for a tweet to stay 'stay_time' to 8 seconds.
Animating tweet height instead of the default opacity animation.
Set 'inf_only' to 1 to return tweets from influential tweeters only.
Set 'inf_tip' to 1 to show tweeter 'influence level' as a tool tip.
Demo 3: Fixed List ►
This demo uses a typical JS call, to create simple list of twitter trackbacks without any transitions..
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://twitter-trackbacks-widget.googlecode.com/files/jquery.twittertrackbacks-1.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('div.my-trackbacks').twitterTrackbacks({
url:'http://www.moretechtips.net/2009/10/twitter-friends-followers-widget-jquery.html'
,n:8
,show_n:0
,inf_tip:1
});
});
</script>
<div class="my-trackbacks">loading..</div>
One change here: 'show_n' was set to 0 to disable any transitions..
Plus few CSS changes to highlight influential users' tweets with darker backgrounds!
Widget Features:
- Display Twitter responses/tweets that mention your link.
- Display tweets as a bar with transition effects or as a fixed list.
- Retweet and reply links for each tweet to encourage people to share your link.
- Return tweets of highly influential users only.
- Style tweets based on the influence level of their users.
- Many transition options like opacity, height, font-size.
- Each part of the tweet like Avatar, links, Hashtags.. has its own class for easy CSS customization.
- Show or hide some parts of the tweet like avatar, author name, date, retweet/reply links.
- Use a typical JS call or auto-load div elements that have "twitter-trackbacks" class.
- Widget adds a small "i" letter that links to here. You can remove it by setting (info) option to empty string (''), but I'll appreciate it if you attribute/link-back to me elsewhere on your website.
This plugin got a lot of positive feedback, huh?
yes @Lam,
Good Twitter feedback :)
Nice stuff. Will definitely give it a go
Is there a way to put some conditional H4 title on top of this DIV? I want to put a title like this:
[Some Image] Twitter Trackbacks:
And here comes the trackbacks.
But i cant find a way to hide this tittle, when theres no twitter trackbacks...
@usuariocompulsivo,
No Tweets at all, Not even 1 tweet by you?!
yet, your request sounds reasonable enough, I'll keep in mind for next version (~1week).. stay tuned
Thanks, you can see what i mean.
Here i have a lots of trackbacks:
http://usuariocompulsivo.blogspot.com/2009/11/como-baixar-mp3-dos-videos-do-youtube.html
Here, on an old post, i have none, but can't figure how to hide the "Twitter Trackbacks" title:
http://usuariocompulsivo.blogspot.com/2007/01/o-iphone-e-morte-da-microsoft.html
Thanks again man!
[]'s
Compulsivo
Its great to track your comment links. "Each tweet comes with reply & retweet links to get more readers engaged in your story conversation." Just another way of marketing through your comments.
Here just to see if theres an update ;-)
[]'s
Compulsivo
@usuariocompulsivo,
Check new option 'header' on plugin options :)
Can it work with hashtags? EG: A fan page that grabs all the queries and place them in a recent list..
@Frederico,
And return tweets that are related to keywords not to links? like this Realtime Related Tweets Bar
Like lets say your business is Blogger. So list any tweet that has #blogger in it.
@Frederico,
I got it :) Check this plugin out Realtime Related Tweets Bar
Nice info there.! I will incude it on my website soon.!
Hello,
I've a problem with this script! It stop working and i don't know why.
http://blog.nunocosta.eu/2010/02/efeito-matrix-por-ilya-larionov.html
Can you help me?
@Nuno,
Do u still have a problem? cause I see it working..
Hi Mike,
I see you *sort of* have the project up on google code. You don't provide the unminified javascript for other developers to work with, though. Have you considered releasing that?
@Adam,
Oops.. that wasn't meant to be! uncompressed version is up now :)
thanks for your feedback.
i like this, i always using twitter to share my status and condition from web and direct, thx for post
wow...its a great web...
hohohoho last i found it
@Beben,
thanks :)
hm, not working on my wp blog using latest jquery.
firebug says:
$("div.twitter-trackbacks").twitterTrackbacks is not a function
found the error :-) working now
"found the error :-) working now "
Could you post the solution please, i am having the same errors, would really love to have this up and running on my website.
Thanks
this is a coool widget
thank you very match for this fantastic plugin!
The twitter avatar seems not working, is it a temporary twitter problem or a plugin problem?
thank you!
hi,
thank you for the good widget. i made a wordpress's widget for easing facility on my blogs. If you would can be use, you can download at the url :
http://www.alecsy.fr/creer-son-site-internet/plugins-wordpress/twitter_trackbacks_bar
or at wordpress.org
http://wordpress.org/extend/plugins/twitter-trackbacks-bar/
You can posted the comments on my siteweb
It's veri interest..
I'm on Blogger and was wondering where you should insert the code. Please help. Thanks.
Hi @Daisy,
You can insert code in HTML/Javascript gadget after "Blog posts".
If you need further help, email me
Hello Mike, first I would like to congratulate you for the great work! This plug-in is really very handy!
Second, I would like to take a question: I looked at the source code of the three demostrations, and all of them, except the fixed list, I saw this code (highlighted in bold):
<div class="twitter-trackbacks" options="{
url:'http://www.moretechtips.net/2009/11/twitter-trackbacks-widget-jquery-plugin.html'
}">loading..</div>
But in the code you provided above, this code isn't present in the first demonstration, so, I wanted to know if is necessary to add this code in the first demonstration or not?
And I wonder if can I publish this code on my blog for my readers, but in my native language. Do you allow me?
Thanks in advance for your attention. (:
@Igor,
Thanks alot for the kind words :)
url by default will be auto-grabbed from current page URL. to override this it can be set manually.
Sure you can feature this plugin the way you like as long as you keep a linkback ;)
Mike: thank you, surely I will linkback to you!
But I am experiencing some problems with this plugin. In old articles (when I installed the plugin), it worked / works perfectly, as you can see in this article:
http://bloggandonaweb.blogspot.com/2010/08/script-para-aumentardiminuir-o-tamanho.html
But recently, it has presented some problems: it doesn't show the avatars used in the twitter profiles, doesn't find all tweets that refer to the article (sometimes it finds nothing) and doesn't show the 'reply' link.
As you can see in this article, the twitter button shows that the article was shared two times, but there is no trackback being shown:
http://bloggandonaweb.blogspot.com/2011/02/criando-e-salvando-um-gif-animado-no.html
Sorry to bother you with these questions, I know you can not provide assistance to all the people, but I really loved this plugin, and would like to continue using it! Hope you can help me to solve this problem.
I don't know if this is relevant, but my blog was created on the Blogger platform. I await a response. Thank you for your attention and patience.
@Igor,
All questions are welcome anytime :)
Sometimes when tweet text is too big for the designated space, then last line will be invisible and you wouldn't see the reply link; you need to increase that space height.
About missing tweets, that is due to the Topsy API tracks the most common URL shortners only.. And sometimes it takes little time to synchronize with Twitter. and the same issue applies to avatars.
can it detect our url automatically? would a pain in the a$$ to change the url every time a new blogpost is up
@ARC,
You can leave the URL empty to use the container page URL, check the plugin options for more details!
thanks for the awesome tutes man. btw, Ive rewritten this post in my language (not English+rephrasing) and have absolutely make a backlink to you.
Cheers!
Mike
---------
I am wondering your solution is much ahead than other solution like tweetback. They use hosted solution whereas your one works on client side which is really amazing.
I would like to know one thing. Say, I have tweeted my page using bit.ly short url. So, from client side I don't know the shorten url. In this case how to use your solution.
I would be grateful if you could provide a solution for that.
@Arc,
Thanks, I really appreciate it
@Ripon,
This plugin uses Topsy API which can handle many URL shorteners and all this plugin needs to know is the full URL of your page..