desmondmorris / node-twitter

Client library for the Twitter REST and Streaming API's.
https://www.npmjs.com/package/twitter
MIT License
1.27k stars 237 forks source link

Use tweet.id_str instead of tweet.id when replying to a tweet #72

Closed arno-di-loreto closed 9 years ago

arno-di-loreto commented 9 years ago

I don't know if it's a bug but when replying to a tweet, the _in_reply_to_statusid value must be _tweet.idstr and not tweet.id.

var s = '@'+tweet.user.screen_name+ ' the answer...'; client.post('statuses/update', {in_reply_to_status_id: tweet.id_str, status: s}, function(error, tweet, response){...});

If you do not do this, the new tweet will not be a reply, the tweet.id is not taken into account. And do not forget to include the '@'+tweet.user.screen_name in the status as explained in Twitter documentation.

desmondmorris commented 9 years ago

@arno-di-loreto its a known issue. See: https://dev.twitter.com/overview/api/twitter-ids-json-and-snowflake