Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem #17

Open
ghost opened this issue Jul 18, 2011 · 9 comments
Open

Problem #17

ghost opened this issue Jul 18, 2011 · 9 comments
Labels

Comments

@ghost
Copy link

ghost commented Jul 18, 2011

Hi! :)

I'm trying to use your framework to develop a mobile application that tweets some information. When i execute the authorize method a new window opens and the user can allow the application to access the twitter information, but then an new window opens that shows a code that a user must copy, and then the window dissapears and the login fails!

I'm really confused with the callback url. If i put a random url the button does nothing.

Can you help me?

@jpurcell
Copy link
Owner

Hi diogocteles, that is a very strange issue. I've not been able to work on development of BirdHouse for some time, and Twitter has been making changes, so there is a possibility the issue is related to that.

What makes the issue strange is that the code that comes up should be for OOB authentication, which BirdHouse doesn't use. I'm rather at a loss here.

Regarding the callback url, the purpose is to put a link to a page you have public on the internet somewhere. You can put any URL except a URL that will redirect. I explain in the Wiki that the app "listens" for the auth tokens in the URL, and if the page immediately redirects the app can't "listen" fast enough, so the login fails.

If you can post output from the console log someone else or myself may be able to help more.

@alex-outwit
Copy link

Hi!
I'm having the same problem: after the twitter login and authorization is shown, I get a view with a key that disappears. Maybe twitter changed something in the app authorization sequence?

@yigit-darcin
Copy link

Hi, I have the same pb. any news on this one?

@jpurcell
Copy link
Owner

jpurcell commented Aug 3, 2011

Hey all, I just found out from a BirdHouse user that the issue for him was the callback URL.

https://github.com/jpurcell/birdhouse/wiki/When-twitter-asks-to-authorize-i%27m-shown-a-pin-and-then-redirected-to-my-app-with-a-message-stating-%22failed-to-authorize%22

If this doesn't fix the issue, please post back!

@jpurcell jpurcell closed this as completed Aug 3, 2011
@jpurcell jpurcell reopened this Aug 3, 2011
@yigit-darcin
Copy link

doesn't fix mine... I just wrote the callback that I write in the dev.twitter.com, but I don't need this callback as I only want to go back to application, not the page.

@jpurcell
Copy link
Owner

jpurcell commented Aug 3, 2011

Regarding the last part, it is imperative to understand what BirdHouse is doing in order to debug it, which is quite unfortunate, because it tries to do something pretty fancy. This is why the callback is necessary: Twitter's OAuth implementation relies on URL redirection. That is, the end points to which data is sent and received are set URLs. The callback URL is where Twitter will send the OAuth tokens and such--that is why it is needed. For more information I've been writing a tutorial on OAuth (which isn't the best, but it's a good go at the topic) that may help clarify some:

http://www.devwebpro.com/a-tutorial-on-oauth-part-1-terminology/
http://www.devwebpro.com/a-tutorial-on-oauth-part-2-overview/
http://www.devwebpro.com/a-tutorial-on-oauth-part-3-setup/

Alright, that said, when BirdHouse finds data from Twitter in the URL it will grab the info and close the dialog box. If the callback URL immediately redirects, then BirdHouse doesn't see the data in time. (Though, really, it's Titanium that doesn't see it in time, but that's beside the point.)

So, that is partly why I believe the issue is the callback URL. The other reason being someone else had similar symptoms and the callback URL was the problem.

I hope that makes sense.

Alright, back to the issue. If the callback is not the cause of the problem, would you mind posting the console output? (And don't forget to leave out any sensitive info like tokens.)

@yigit-darcin
Copy link

fixed on my site with the help of Joseph. thx again..

@Urme
Copy link

Urme commented Nov 3, 2011

I can't get this working, I have put a callback_url both on Twitter settings and inside the application.

When I authorize the app, the webview closes without a problem etc and everything looks OK, except I never get Authorized: True.

Here is my output from Appcelerator:
http://www.pastie.org/2804824

Please anyone knows what's up with this? I'm using the example files for Birdhouse

@mnadeemughal
Copy link

I am facing the same issue. Anyone solved this? if yes. how?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants