New Code to Display Latest Tweets

[highlight]The code below no longer works as-is with the Twitter API update to 1.1 as of 2013-06-11.Here’s a PHP way to interact with the new Twitter API.[/highlight]

Twitter recently deprecated the code that we using to display latest tweets

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

So the above code will not work any more.
We have to use this updated code to get latest tweet

<div id="twitter_update_list"></div>
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://api.twitter.com/1/statuses/user_timeline.json?count=1&exclude_replies=true&screen_name=maidul&callback=twitterCallback2"></script>
2 replies
    • maidul
      maidul says:

      Dear Ninja,
      Here is the code for latest 3 tweets.

      <div id="twitter_update_list"></div>
      <script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
      <script type="text/javascript" src="http://api.twitter.com/1/statuses/user_timeline.json?count=3&exclude_replies=true&screen_name=maidul&callback=twitterCallback2"></script>
      

      You just have to change the count=1 to count=3

      Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply