-
Notifications
You must be signed in to change notification settings - Fork 109
data.text empty #16
Comments
Hi, Could you check that http is the correct protocol for twitter? I had the same problem, in that jsOAuth doesnt handle 302 redirects very well. I found using https to work. |
It looks like this bit of code will need rethinking. I'm not sure myself how to treat 30x status codes - behaviour isn't consistent across APIs. Some of them give empty response, some just throw HTML (ignoring |
I did some tests trying to abort the redirect, however in chrome, the status never went to 302. This leads me to think that at least in chrome, the 302 is swallowed. |
Oh boy... It will depend how the browser treats 302 - if it's treated as "permanent" redirect, it will ignore it and take you directly to final location ignoring any interstitial urls. (at least that's how I understand it). Why (and where) they are redirecting anyway? I only had this problem with one API before - when a request failed, instead of responding with 503 (or similar), the service's load balancer would redirect you to a totally different page on a different server. In theory debugging this with something like PhantomJS would work, since it doesn't have a "memory" of previously visited urls and their response codes. |
In my case i was using http:// and not https://, twitter attempts to redirect you to the https version, therefore invalidating the signature. Part of the signature base string is the url. I was hoping to catch the 302, Abort the request, resign and resend... but nope you cant do that. So far i see this affecting Chrome and Titanium, I expect this will be across the board. |
I tried with https:// too, not working, same stuff, 200 OK status and a blank data.text :( |
I notice you have |
Yes firefox |
Could you try the jsOAuth boiler plate? Plumb in your details and make sure you set |
Right i'm trying here, but the authorize window that opens is probably missing some params, the window url is https://api.twitter.com/oauth/authorize? and twitter are throwing : Woah there! This page requires some information that was not provided. Please return to the site that sent you to this page and try again … it was probably an honest mistake. |
Even the request_token is returning data.text blank so when it redirects to the authorize url it goes with no params, because there's not a request_token. |
Jhimy, I think you're using FF5? I also have this issue , but not in FF 3.6.19. I'm guessing the little hack I use doen't work any more.
and
in about:config I'd switch to chrome if you can. |
Yes i was using FF5. /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-web-security --allow-file-access-from-files --allow-file-access spec/runner.html I'm getting [0714/110048:INFO:breakpad_mac.mm(89)] Breakpad disabled This line should be run with sudo permissions ? |
I use a separate profile so I can run multiple instances of chrome .
where |
Oh, it's working now : ) |
Already ahead of you. :) |
For anyone using ubuntu, you can use chrome in this way /opt/google/chrome/google-chrome --disable-web-security --allow-file-access-from-files --allow-file-access --user-data-dir=./chrome/ /path/to/html/file.html you will want to change /path/to/html/file.html. If you want to create a shortcut to make things easier, add to panel, choose custom application launcher and use the following command: /opt/google/chrome/google-chrome --disable-web-security --allow-file-access-from-files --allow-file-access --user-data-dir=./chrome/ %U now, if you want to open an html file, just drag and drop it onto the shortcut. |
1 Uncaught ReferenceError: netscape is not defined Chrome for Mac. |
On chrome don't use enablePrivilege. This is for firefox 3 only. As documented |
Hi there, if i'm posting this in the wrong place please forgive me.
I'm working with jsOAuth, trying to retrieve some data from twitter:
I'm getting a 200 OK status in the request but the data.text retrieved is empty. Any idea?
Thanks!
The text was updated successfully, but these errors were encountered: