Monday, February 15, 2010

Integrate Twitter

In my recent project we integrated twitter library
to connect to the most used social networking site, Twitter.
Day after day twitter is becoming famous and is
also coming up with innovative ideas to interact with
their site from your sites. There are many libraries in
almost all the languages say Mytwitter(php),
AppTweet(perl), Twitter4j(Java) with different types
of licenses. For PHP,Twitterlibphp is mostly
used and it is very easy to implement too.
Just we need to call the library class after downloading
and including it in your site. We can send/reply to tweets,
can get the number of followers/messages/friends.. etc
Twitter library gives you a lot of functions to get almost all
the information from twitter.

e.g code for Twitterlibphp

// require the twitter library
require "twitter.lib.php";

// your twitter username and password
$username = "your_username";
$password = "your_password";

// initialize the twitter class
$twitter = new Twitter($username, $password);

// fetch number of followers in xml format
$xml = $twitter->getFollowers();
?>

No comments:

Post a Comment

Design thinking at work (Book summary)

Key things to keep in mind The essence of design thinking, in many ways, involves identifying problems by seeing things that other peo...