Showing posts with label twitter. Show all posts
Showing posts with label twitter. Show all posts

Wednesday, September 15, 2010

Twitter Version 2.0.10(2010)

Twitter has unveiled its new version( say version 2.010) that changes the interface, introduces new features and promises to be "faster, easier and richer." This will have a double-paned view of things. Quite frankly, it uses a lot of the wasted space on the page.

Each pane will take up half the screen. The left-hand column will contain the regular old timeline of Tweets. Click on a Tweet, and the right hand pane shows the details of the Tweet, including the user profile of the sender, the conversation it's in, and more. Videos and pictures can be seen in the right pane.

Some of the welcomed features of this new twitter are as follows:
  1. Two-pane interface:
    The new interface is clean and well organized. Lists and trends are easier to view (requiring less scrolling) than with the old Twitter.
  2. Embedded media:
    New Twitter will display the photo on the right half of the page . You'll also see more information such as other tweets that have linked to that same image. Videos, too, will be embedded. If you click on a tweet containing a link to a YouTube video, the video will play right on right-hand pane instead of redirecting you to YouTube. This eliminates the hassle of closing multiple browser tabs once you're done viewing. 
  3. Continuous scrolling:
    In the new Twitter, the "more" button at the bottom of the page used to load older tweets will be gone. Now, you'll be able to scroll through older tweets continuously, without having to manually load more.

Saturday, April 17, 2010

PHP script for getting tweet updates

Here is the php script to get updates from a twitter account.

   $uname = "YourUserName";
   $url = "http://twitter.com/statuses/user_timeline/$uname.rss";
   $rss = @file_get_contents($url);

  if($rss)
  {
          $xml = @simplexml_load_string($rss);
          if($xml !== false)
           {
                 foreach($xml->channel->item as $tweet)
                  {
                       echo $tweet->pubDate."\n";
                       echo substr($tweet->description,10)."\n";
                   }
            }
           else
             {
                   echo "Error: RSS file not valid!";
             }
       }
       else
      {
          echo "Error: RSS file not found, Invalid username";
      }
?>



Sunday, April 04, 2010

tweeting from the BASH terminal

i feel this an awesome script..tweet from command line terminal in linux..
script is as follows:

#!/bin/bash

username="yourUserName" ;
password="yourPassword";

URL="http://twitter.com/statuses/update.xml" ;

if [ $(echo "$1" | wc -c ) -gt 140 ]
then
echo "Whoo: Its more than 140 characters"
exit 0;
fi

result=$(curl -u $username:$password -d status="$1" $URL) ;

exit 0 ;

save this in some file name "tweet" and make it executable ( chmod +x tweet )
And for simplicty add an alias ..
Now tweet from terminal using the command
tweet "tweeting from the command line"