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

How to install PHP7.x, MySQL5.7 on Ubuntu 16.x

Open the terminal >sudo apt-get update >sudo apt-get install php-mbstring php7.0-mbstring php-gettext apache2 mysql-server-5.7 m...