I apologize if this is a very simple question- so new to this :) I need to convert Basic Auth to oAuth. Here's what's existing:
-------------------------------------------------------------------------------- // set user/pswd $username = 'mytwitterusername'; $password = 'mytwitterpassword'; // create a new curl resource $ch = curl_init(); // set URL and options curl_setopt($ch, CURLOPT_URL, "http://twitter.com/statuses/ friends.xml"); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_USERPWD, "$username:$password"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // execute and pass to browser $str = curl_exec($ch); //print XML data (temporary) $xml = simplexml_load_string ($str); $username = $xml->user->name; $userscreenname = $xml->user->screen_name; $userid = $xml->user->id; foreach ($xml->user as $twit1) { echo "<p class='text-name'>", $twit1->name,"</p>";//status echo "<p class='text-screenname'>", $twit1->screen_name,"</p>";// status -------------------------------------------------------------------------------- I've downloaded Abraham's excellent code, but honestly don't know where to start. I assume I need to replace the $username and $password bit with something like this: require_once('twitteroauth.php'); $connection = new TwitterOAuth('app consumer key', 'app consumer secret', 'my access token', 'my access token secret'); $connection->format = 'xml'; Can anyone help? Thanks very much Lorraine -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
