Help on testing - oAuth callback?

#1 · closed · 3 comments

View on GitHub ↗

RoundSparrow

Hi, I wanted to try out your app to see the new Android L in action. I registered an app with Twitter and got oauth keys - however, I can't figure out how to do the callback with your app? It seems the app is looking for the callback? When I click sign-in it launches Chrome - I get the authorization code - but no way to return to Openfeed.... the sign in valid in Chrome but doesn't get returned to openfeed. Thanks

Comments

wmora

Hi, take a look at the AndroidManifest. In there I specify the host and schema used for the callback URL.

RoundSparrow

I see this: ``` <data android:host="openfeed-android" android:scheme="oauth" /> ``` But I guess I'm needing a little more hand-holding here. I registered my own Twitter Application API keys - what exactly do I need to match up? I'm assuming you are trying to prevent from putting your own keys up on Github for the app..?

wmora

That's exactly the purpose, everyone should register their own app to run this project. Also, you don't really to publish your keys on a public repo for security purposes :) With that said, the callback is not really related to your app registration, it could be anything you want. In fact, you may use the same one this project uses. You only have to make sure you send the callback in the format <i>scheme://host</i> as it is declared on your AndroidManifest (ex: oauth://openfeed-android). Twitter will send back a uri in the format <i>scheme://host?oauth_verifier=verifier_value</i> and <code>WelcomeActivity</code> will be able to parse it since you told it to handle this kind of data in your activity declaration. Let me know if it works. Please note that this project is far from over so make sure you follow the updates. Soon I'll add some notes on how to run the project if forking/cloning.