-
Notifications
You must be signed in to change notification settings - Fork 163
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
v0.5.0 updateStatus error #74
Comments
Same error for me, any ideas? |
My code: var twitter = require('ntwitter');
var credentials = require('./credentials.js');
var t = new twitter({
consumer_key: credentials.consumer_key,
consumer_secret: credentials.consumer_secret,
access_token_key: credentials.access_token_key,
access_token_secret: credentials.access_token_secret
});
t.stream('user', {'with':'user'}, function(stream) {
stream.on('data', function (data) {
// console.log(data);
if ('text' in data) {
if (data.text.toLowerCase() == "@pbtest001 start") {
t.verifyCredentials(function (err, data) {
console.log(err);
// console.log(data);
})
.updateStatus('pickup started!',
function (err, data) {
console.log(err);
// console.log(data);
}
);
}
}
});
stream.on('end', function (response) {
// Handle a disconnection
});
stream.on('destroy', function (response) {
// Handle a 'silent' disconnection from Twitter, no end/error event fired
});
}); And the error returned from updateStatus:
|
I'm getting this error as well... and on DMs |
This is a bug in the |
I was having the same problem and found that having characters like exclamation points and apostrophes in the message was the problem. As mentioned, the issue seems to be upstream in node-oauth, where these characters are not being properly escaped. See ciaranj/node-oauth#113 (comment) and ciaranj/node-oauth#114 for a better description and some possible solutions. Thanks @AvianFlu for looking into this. |
Does it escape correctly in 0.4.1? |
0.4.1 uses the old Twitter REST API (v0.4.1...v0.5.0#L1R7), which seems to be a little more forgiving to unescaped characters. |
Any resolution? |
I had the same situation testing my library. I think the problem is related with the app credentials. Try creating a new app if you are using the REST API V1.1. |
Having the same issue. Reverted to v0.4.1 as temporary solution. |
Is there any update on this? One of my applications is quite seriously affected by this bug. |
yep @guyht So you just need to replace this code: or this: :) |
Thanks @preziusoftware The node-oauth patch rolandboon/node-oauth@240a992 solved the issue. |
:) you most welcome |
This also applies with the twitter stream streamFilter = { track: 'that\'s cool' };
twitter.stream('statuses/filter', streamFilter, function handleStream(stream) {
stream.on('error', function(err, data){
console.log(err);
console.log(data);
});
}) It returns a 401 error |
Everyone, I applied the patch mentioned by @kaosdynamics and it worked perfectly. |
Looks like the issue is now fixed in node-oauth ciaranj/node-oauth@45a983e Hopefully we'll have an updated npm package soon. |
+2 plz |
Hi,
When I updated code to v0.5.0 updateStatus function returns :
{"errors":[{"message":"Could not authenticate you","code":32}]}
Reverting back to 0.4 works . I assume it's connected with twitter API 1.1 ?
The text was updated successfully, but these errors were encountered: