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

incorrect oauth requests for search streams #73

Open
jamescauwelier opened this issue Sep 20, 2012 · 2 comments
Open

incorrect oauth requests for search streams #73

jamescauwelier opened this issue Sep 20, 2012 · 2 comments

Comments

@jamescauwelier
Copy link

When I try to start a search stream with track=test,test'ing it fails.

track=test works fine
track=test,test'ing => 401 error

The response I receive is a 401 and I suspect that when POST 'ing the oauth is not done correctly.

Please let me know what extra information I can provide to further debug this issue?

@jamescauwelier
Copy link
Author

I have found what actually is causing the issue in a related ticket:
ciaranj/node-oauth#113 (comment)

@jamescauwelier
Copy link
Author

It 's not fixed by calling this.oauth.post with a stringified version of the parameters.

This explains why: ciaranj/node-oauth#113 (comment)

For now, I have forked oauth and ntwitter and implemented the fix in oauth. That is quite hacky and the reason why I didn 't do a pull request of it. The change could break oauth in other library apart from twitter.

Op 27-sep.-2012, om 02:10 heeft David Lee het volgende geschreven:

Has the issue been resolved? Any solutions? I tried copying and pasting your solution, but it still didn't work:

var url = stream_base + '/' + escape(method) + '.json';

// to stringify to fix problems with ' characters in track parameter
var stringified_params = querystring.stringify(params);
stringified_params = stringified_params
.replace(/!/g, "%21")
.replace(/'/g, "%27")
.replace(/(/g, "%28")
.replace(/)/g, "%29")
.replace(/*/g, "%2A");

var request = this.oauth.post(
url,
this.options.access_token_key,
this.options.access_token_secret,
stringified_params, null
);


Reply to this email directly or view it on GitHub.

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

No branches or pull requests

1 participant