Hi Arlo,

Happy to help.

First, Twitter doesn't support any two-legged OAuth aside from the mandatory
two-leggedness of the request token step of OAuth and the variant xAuth
flow. Two-legged OAuth is where you sign requests and present your API key
but you have no "user context" (the access/oauth_token). If you're signing
an API request with OAuth, you must include an oauth_token to provide
context on the user who is making the request.

We're more strictly enforcing correctness in OAuth signatures and requests
now. Is the account that you're trying to retrieve the user_timeline for a
protected account? Are you using API urls in the style of
http://api.twitter.com/1/statuses/home_timeline.json ?

If you want to access a resource without a user context, you should simply
directly request the resource without attaching any kind of authorization to
the request at all.

Thanks,
@episod <http://twitter.com/intent/user?screen_name=episod> - Taylor
Singletary


On Wed, Jun 15, 2011 at 10:09 AM, arlomedia <[email protected]> wrote:

> Last July I installed oauth-php to display items from my user timeline
> on my website home page. I then copied the setup to another website
> with another Twitter account and both have been working fine.
>
> Then a few days ago both websites started returning error code 401,
> "This method requires authentication." I can successfully run the
> request_token command, but when I run the statuses/user_timeline
> command I receive this error.
>
> After experimenting with my own code for a while, I went back to
> oauth's Twitter example code here:
>
> http://code.google.com/p/oauth-php/source/browse/trunk/example/client/twoleggedtwitter.php
> .
> This worked fine when accessing the public timeline, but when I
> changed it to access the user timeline, I received the same
> authentication error.
>
> I've updated to the latest version of oauth, but that made no
> difference. I also reset my consumer key and consumer secret key and
> that made no difference, either.
>
> Can someone tell me what might have changed in the last few days, or
> how I should proceed with troubleshooting this?
>
> --
> Twitter developer documentation and resources: https://dev.twitter.com/doc
> API updates via Twitter: https://twitter.com/twitterapi
> Issues/Enhancements Tracker:
> https://code.google.com/p/twitter-api/issues/list
> Change your membership to this group:
> https://groups.google.com/forum/#!forum/twitter-development-talk
>

-- 
Twitter developer documentation and resources: https://dev.twitter.com/doc
API updates via Twitter: https://twitter.com/twitterapi
Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
https://groups.google.com/forum/#!forum/twitter-development-talk

Reply via email to