Consider the oauth callback that you set in your application record as not
much more than a placeholder. In OAuth 1.0A, it is required to send the
oauth_callback you want to use explicitly on the request token step -- so
regardless of what you set on dev.twitter.com, you still have to provide a
URL during the OAuth sequence.

While the UI on dev.twitter.com will not allow custom URI schemes, the
request token step will. So, put a placeholder in on your application
record, preferably pointing to a website representing your application, and
explicitly declare your custom callback on the request token step.

Taylor

On Mon, Dec 13, 2010 at 5:27 PM, Mathias Lin <m...@mathiaslin.com> wrote:

> How to get twitter oauth callback url returned to activity (on
> Android) when it's a callback url starting with http - or
> alternatively: how to register a callback url that doesn't start with
> http?
>
> I want to use signpost/OAuth with Twitter in my native Android app so
> that I have an activity handling the callback url (and user doesn't
> need to enter the pin or the pin doesn't need to be screen scraped). I
> found many posts with samples like:
>
> Oauth Callback not found after allowing the app on Twitter.
>
> http://dev.bostone.us/2009/07/16/android-oauth-twitter-updates/#idc-cover
>
> http://code.google.com/p/agirardello/
>
> and they all use a callback url that doesn't start with http. For
> example:
>
> <data android:scheme="myapp" android:host="twitt"></data>
> But how to register a callback url in the twitter app settings? I'm
> always getting 'invalid url format' when submitting the app settings
> form.
>
> I suppose, since I am in the browser already when the twitter site
> calls the callback url, I cannot just use http as the scheme (I tried
> to use http://www.mydomain.com and set http as the scheme and
> www.mydomain.com
> as the host). At least in my test, I won't be redirected to the app
> but remain in the browser and the callback url is opened in the
> browser. (I also cleared the defaults of the browser app before.)
>
> <data android:scheme="http" android:host="www.mydomain.com"></data>
>
> --
> 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
>

-- 
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

Reply via email to