You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lorne Gaetz edited this page May 27, 2014
·
6 revisions
twitterlibphp was designed to be as simple to use as possible. Here is a simple way to return the XML from your profile:
<?php
// require the twitter library
require "twitter.lib.php";
// your twitter username and password
$username = "username";
$password = "password";
// initialize the twitter class
$twitter = new Twitter($username, $password);
// fetch your profile in xml format
$xml = $twitter->showUser();
// display the raw xml
echo "<pre>";
echo htmlentities($xml);
echo "</pre>";
?>
Now the $xml variable contains the XML data of your Twitter profile, and you can use it for whatever you need to.