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

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

Open
SaltedCaramelCoffee opened this issue Sep 19, 2021 · 3 comments

Comments

@SaltedCaramelCoffee
Copy link

SaltedCaramelCoffee commented Sep 19, 2021

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:

url: `${getUrl('stream')}/${resource}${this.config.extension ? '.json' : ''}`,

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.

@filipmacek
Copy link

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

@kieron
Copy link

kieron commented Jan 12, 2022

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

@Dani21
Copy link

Dani21 commented Feb 5, 2023

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

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

No branches or pull requests

4 participants