Re: [twitter-dev] Re: Help converting Basic Auth to oAuth

2010-10-04 Thread Abraham Williams
It might be the following but you can var_dump() $tweets and see the structure of it to be sure. foreach ($tweets as $tweet) { echo $tweet->status->text; } Abraham - Abraham Williams | Hacker Advocate | http://abrah.am Update: http://blog.abrah.am/2010/10/organizing-my-life.html @a

Re: [twitter-dev] Re: Help converting Basic Auth to oAuth

2010-10-01 Thread Lorraine
Thanks again, but now am getting: Warning: Invalid argument supplied for foreach() It looks correct to me, so I'm confused about the warning. Thanks Lorraine On Fri, Oct 1, 2010 at 3:54 AM, Abraham Williams <4bra...@gmail.com> wrote: > You don't need the cURL and XML code. > > require_once('tw

Re: [twitter-dev] Re: Help converting Basic Auth to oAuth

2010-09-30 Thread Abraham Williams
You don't need the cURL and XML code. require_once('twitteroauth.php'); $connection = new TwitterOAuth('consumer key', 'consumer secret', 'access token', 'access token secret'); $tweets = $connection->get('statuses/friends_timeline'); $latesttweets = count($tweets); foreach ($tweets->status as $t

Re: [twitter-dev] Re: Help converting Basic Auth to oAuth

2010-09-30 Thread Lorraine
Also wanted to mention that the original code is based on the tutorial here: http://papermashup.com/using-the-twitter-api/ and the data is automatically inserted into a database. Thanks, Lorraine Thank you so much, Abraham! I'm getting an error "String could not be parsed > as XML" now- this is

Re: [twitter-dev] Re: Help converting Basic Auth to oAuth

2010-09-30 Thread Lorraine
Thank you so much, Abraham! I'm getting an error "String could not be parsed as XML" now- this is what I now have (with my reset consumer keys put in :-)): require_once('twitteroauth.php'); $connection = new TwitterOAuth('consumer key', 'consumer secret', 'access token', 'access token secret'); $t

Re: [twitter-dev] Re: Help converting Basic Auth to oAuth

2010-09-30 Thread Abraham Williams
Make sure you reset your consumer key on http://dev.twitter.com/apps and try not to post them in public in the future. This should work. I switched it to json as it didn't look like you needed the actual xml and dropped the count as 20 is the default. require_once('twitteroauth.php'); $connection

[twitter-dev] Re: Help converting Basic Auth to oAuth

2010-09-30 Thread Lorraine
Maybe I should explain what I'm trying to do-- basically just want to get my own status updates and the (public) details & updates of my friends. Would it work if I replaced this: $login = "mytwitterusername:mytwitterpassword"; $tweets = "http://twitter.com/statuses/friends_timeline.xml?count=20";