Created
November 8, 2010 15:51
-
-
Save tjlytle/667833 to your computer and use it in GitHub Desktop.
Example getting follower count and last status using SimpleXML and the Twitter API. Any information returned from the show API (http://dev.twitter.com/doc/get/users/show) can be accessed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getUser($name){ | |
$user = simplexml_load_file('http://twitter.com/users/show.xml?screen_name='.$name); | |
return $user; | |
} | |
$user = getUser('tjlytle'); | |
echo $user->followers_count; | |
echo $user->status->text; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Any information returned from the Show API can be accessed.