EGHDK
EGHDK

Reputation: 18120

Trying to display latest Tweet

I've been using a few tutorials to help me display my latest tweet, but I haven't had any success since it suddenly stopped working about a week ago.

This is my JS:

<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/username.json?callback=twitterCallback2&count=1"></script>

And my HTML:

<div id="twitter_div"><ul id="twitter_update_list"><li>&nbsp;</li></ul></div>

But it comes up empty in JS fiddle.

http://jsfiddle.net/BVDVH/149/

I have no idea why, but it was working before and just stopped working on my website about a week ago.

EDIT:

Answer in comments. Was not seeing last tweet because it was a re-tweet. Had to set it to true.

Upvotes: 0

Views: 1638

Answers (2)

user1496176
user1496176

Reputation:

firstly this was answered before here

however that example requires a plugin

a cleaner method is described here

Upvotes: 0

Austin
Austin

Reputation: 6034

You are missing the script that handles the data loaded from twitter. The twitter API expects a callback of twitterCallback.

EDIT: didnt realize that blogger.js provided the callback. Answer fiddle is in the comments

Upvotes: 1

Related Questions