It seems that twitter incorrectly handles the oauth_callback parameter
when it's a custom URI. While testing MPOAuth with the API I noticed
that when it tried to use my custom URI handler it would incorrectly
append the callback URL relative to the twitter domain rather than as
a URL on its own.

The sequence is as follows: C for Consumer, U for User, P for
Producer
C1. Get Request Token
C2. Send Request Token and custom callback to user auth page
<NSMutableURLRequest
http://twitter.com/oauth/authorize?oauth_token=i6DUgOA9CHyDyidtVezmsUgy6oS9VLXOA9NUmNceO4&oauth_callback=x-com-mpoauth-mobile%3A%2F%2Fsuccess>
U1. Provide Credentials and hit allow
FORM submit to <NSMutableURLRequest http://twitter.com/oauth/authorize>
P: Load page at <NSMutableURLRequest http://twitter.com/oauth/authorize>
P: Redirect page to <NSMutableURLRequest
http://twitter.comx-com-mpoauth-mobile://success?oauth_token=i6DUgOA9CHyDyidtVezmsUgy6oS9VLXOA9NUmNceO4>

I'm not sure why the server tried to redirect to that page, but that
is a valid URI so I can't see why it'd append it that way.

_Karl

On Feb 13, 7:51 am, Matt Sanford <[email protected]> wrote:
> Hi there,
>
>      You can always make up hostname and add it to your /etc/hosts  
> file (or equivalent). We do have an issue filed to relax the URL  
> restrictions.
>
> Thanks;
>    — Matt Sanford
>
> On Feb 13, 2009, at 01:20 AM, bear wrote:
>
>
>
> > Any chance of being allowed to use a callback URL that is local?
>
> >http://localhost:4000/callback/
>
> > This would let me test using my local resources and not have to
> > wrangle a server setup
>
> > thanks,

Reply via email to