twitter-lite icon indicating copy to clipboard operation
twitter-lite copied to clipboard

twitter-lite client stream method always defaults to api version 1.1

Open SaltedCaramelCoffee opened this issue 4 years ago • 3 comments

I'm trying to use twitter-lite with API v2. It looks like the stream method calls getUrl method with the subdomain stream, but never passes in the endpoint version, which makes it always default to 1.1.

The line of code that caused this issue: https://github.com/draftbit/twitter-lite/blob/00052e6b920e642a401f37b66972fd7b8553fa00/twitter.js#L317

I think the solution is to just pass in this.config.version as second parameter to getUrl. Let me know if you think there's a better way to resolve this. I'm happy to make the pull request to fix this issue.

SaltedCaramelCoffee avatar Sep 19 '21 09:09 SaltedCaramelCoffee

Was also looking how to stream with v2, but its not possible with 1.1 as default parameter in getUrl function

filipmacek avatar Oct 21 '21 16:10 filipmacek

Any update on if this is possible to stream v2 yet?

kieron avatar Jan 12 '22 10:01 kieron

Because of this bug, there is now no usable version of this API endpoint that'll work. Twitter is deprecating all v1.1 streaming APIs in a month: https://twittercommunity.com/t/announcing-the-deprecation-of-v1-1-statuses-filter-endpoint/182960

I'm going to use the following library instead which has way better support and is being actively maintained: https://github.com/plhery/node-twitter-api-v2

Dani21 avatar Feb 05 '23 01:02 Dani21