I'm using the oayth2 python binding from 
1. I perform a request for obtaining 'Request token' I send the
following parameters:
{'oauth_consumer_key': xxxxx,
  'oauth_timestamp': xxxxx,
  'oauth_nonce': xxxx,
  'oauth_version': x}

Also I sign in the request with HMAC signature base string
This yields me oauth request token and oauth request secret.

2. Now using this I send the user fro authorization by calling the

3. Once the user is authorized, he/she is redirected to a callback url
that I have specified in my app setting while registration. It is this
callback url that I want to override.

When should this overriding take place?Should I place the parameter
oauth_callback from the very beginning of the request(while requesting
Request Token) or once the user is authorized?

I tried to put the parameter 'oauth_callback' as a default parameter
in my request header. It worked fine till authorization but once once
authorization succeeded I could not obtain correct access token and
access token request for that authorized user. What I get is this:

{oauth_nonce: xxxx, oauth_timestamp:xxxxx, oauth_token: xxxxxxx,
oauth_token_secret: HMAC-1, oauth_verify:xxxxxx,}
Note: The oauth_token is incorrect as I know the correctb token for
that user is something else.

But while I do not try to override the oauth_callback url everything
is working smoothly(I obtain the correct oauth token and secret for
that user)

As far as the url is concerned its just my local machine's ip that
I've provided in my callback url(app settings),;8000/register/authenticated/
and I tried to override it with;8000/register/authenticated/?q=xxxxxxxxx

Please suggest where am I going wrong?Or are there any steps that I'm
not following?Please highlight them if any.


On Jun 4, 6:52 pm, Taylor Singletary <taylorsinglet...@twitter.com>
> Could you share some of the steps of your request while setting your
> oauth_callback?
>   * Signature Base String
>   * Your Authorization header
>   * Any POST body you are sending
>   * The exact URL you are executing
> What happens when you complete the authorization step? What specifically
> does not happen?
> Taylor Singletary
> Developer Advocate, Twitterhttp://twitter.com/episod
> On Fri, Jun 4, 2010 at 6:08 AM, avinash <avinash...@gmail.com> wrote:
> > Hi,
> > I'm working on a web app(interacts with twitter) which uses an oauth
> > protocol for user authorisation. I had registered my app at twitter
> > with a specified callback url. But while I make an request I override
> > it by binding  oauth_callback parameter in my request header. It works
> > fine till user authorization is concerned but I'm not able to obtain
> > the authenticated user's access token.
> > But however if I do not override the callback url everything works
> > fine.
> > Please could you suggest where am I going on?Highlight some pointers
> > so that I could resolve the issue.
> > Avinash

Reply via email to