Hey Alexandre,

We recommended that oauth parameters are placed in an Authorization
header instead of the query string. It makes URLs a lot tidier and
easier to debug.

Looking at your symptoms it suggests the order of your parameters is
different when generating the signature compared to the order in the
query string.

I think your basestring is being created with the parameters in
alphabetical order, but your query string does not maintain that. This
would explain why max_id works and since_id does not -- max_id comes
before oauth_* parameters alphabetically but since_id comes after
them. In your querystring since_id is before the oauth parameters.

Try with since_id at the end of your query string. If that works you
need to make sure you sort you parameters before sending them to
Twitter.

Best,
Matt

On Wed, Sep 8, 2010 at 2:04 PM, Alexandre Pires
<alexandrepires2...@gmail.com> wrote:
> Taylor, I dont know how the component does this, but the strange is that the
> same code works fine if I use max_id instead of since_id.
>
>
>
> ----- Original Message -----
> From: Taylor Singletary
> To: twitter-development-talk@googlegroups.com
> Sent: Wednesday, September 08, 2010 5:12 PM
> Subject: Re: [twitter-dev] Problems with parameter since_id
> Hi Alexandre,
> That's your execution URL, not your signature base string -- which might be
> more difficult to access, depending on your library. When a signature
> validation error occurs, it most often can be traced back to the signature
> base string: the specific string that is constructed and then signed to
> create your signature.
> Do you know how to access components of this process?
> Taylor
>
> On Wed, Sep 8, 2010 at 11:30 AM, Alexandre Pires
> <alexandrepires2...@gmail.com> wrote:
>>
>> Hi, my url is somethink like this:
>>
>>
>> http://api.twitter.com/1/statuses/home_timeline.xml?since_id=23937068328&oauth_consumer_key=cJwcYa5qNKb8VCDcJTKVxQ&oauth_nonce=2D9B8D9CBD3318EC2017CFD1DF8E5465&oauth_signature_method=HMAC-SHA1&oauth_signature=izFyAuYwkZvvz%2BKhmG1S6aFb5%2FI%3D&oauth_timestamp=1283970241&oauth_token=42722301-kyYKZ0lpKRkpP7pJNTH8sOjYkAePpqM7peLMolYtz&oauth_version=1.0
>>
>> Some idea ? When I was using basic authentication, was working.
>>
>>
>>
>>
>> ----- Original Message ----- From: "Taylor Singletary"
>> <taylorsinglet...@twitter.com>
>> To: <twitter-development-talk@googlegroups.com>
>> Sent: Tuesday, September 07, 2010 12:46 PM
>> Subject: Re: [twitter-dev] Problems with parameter since_id
>>
>>
>>> Can you share an example of your signature base string in the case of
>>> using since_id? Are you actually using since_id=12345?
>>>
>>> Taylor
>>>
>>> On Tue, Sep 7, 2010 at 4:22 AM, Alexandre <alexandrepires2...@gmail.com>
>>> wrote:
>>>>
>>>> Hi Guys,
>>>>
>>>> Well, I'm trying to use home_timeline with parameter since_id, but is
>>>> not working
>>>>
>>>> if I use max_id, works well, but if I use since_id not work
>>>>
>>>> http://api.twitter.com/1/statuses/home_timeline.xml?max_id=54321 (this
>>>> works)
>>>>
>>>> http://api.twitter.com/1/statuses/home_timeline.xml?since_id=12345
>>>> (this dont work)
>>>>
>>>> the error returned is:
>>>>
>>>> (401) <error>Incorrect signature</error>
>>>>
>>>> I'm doing OAuth authentication correctly
>>>>
>>>> why only with since_id not working, but with max_id work ?
>>>
>>> --
>>> 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?hl=en
>>
>> --
>> 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?hl=en
>
> --
> 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?hl=en
>
> --
> 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?hl=en
>



-- 


Matt Harris
Developer Advocate, Twitter
http://twitter.com/themattharris

-- 
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?hl=en

Reply via email to