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

How is this library going to work with the Enterprise plan? #173

Open
dandv opened this issue Feb 13, 2018 · 5 comments
Open

How is this library going to work with the Enterprise plan? #173

dandv opened this issue Feb 13, 2018 · 5 comments

Comments

@dandv
Copy link

dandv commented Feb 13, 2018

https://techcrunch.com/2017/12/19/twitter-launches-a-new-enterprise-api-to-power-customer-service-and-chatbots/

https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/site-stream

Also, the link to "Twitter Stream API" in the README is now broken.

@trygve-lie
Copy link
Owner

Not 100% since I've not had time to look into it.

Twitter have had a separate bigpipe plan for a long time which only selected customers have access too. I've never had, so I've never had the chance to test against it, but how one connect to it is the same as all other stream end points so in theory this lib works against the bigpipe plan. I've just never been able to test that. I expect the new Twitter API to connect in the same way as before but there are new endpoints.

I'll try to find some time to start digging into it soon. PRs on the new API is welcome also.

@trygve-lie
Copy link
Owner

So, PowerTrack seems to be the new API: https://developer.twitter.com/en/docs/tweets/filter-realtime/api-reference/powertrack-stream

Connecting to it seems to be as before. Iow; this client should be able to do so. We just need to add the endpoint. Though, its a bit hard to test since I don't have access to it. Do you have access to it in any way?

@trygve-lie
Copy link
Owner

Seems to be a 30 day dev access to it: https://developer.twitter.com/en/docs/tweets/search/overview/enterprise

That might give us access to test any implementation.

@dandv
Copy link
Author

dandv commented Feb 14, 2018

Thanks for looking into this. Did you mean you found a 30-day developer trial period? The link only mentions searching among the last 30 days worth of tweets.

I'm trying to figure out what the transition plan is for streaming APIs like get/site. The Account Activity API doesn't really seem to do the same thing.

@dandv
Copy link
Author

dandv commented Feb 15, 2018

Unfortunately I don't have Enterprise access and I'm just building an app for personal use.

I'm using the module and I get a 403 in the connection error http handler for the site stream, but other streams, e.g. statuses/filter, do work, with the same credentials.

const friendIds = (await T.get('friends/ids', { screen_name: 'dandv' })).data.ids.slice(0, 10);
console.log(friendIds);  // looks good

TStream.stream('site', {
  follow: friendIds.join(','),
  stall_warnings: true,
});

TStream.on('connection error http', function (httpStatusCode) {
  console.log('connection error http', httpStatusCode);  // 403
});

TStream.on('data', function (obj) {
  console.log('data', obj);
});

Does this library support the 'site' feed? It requires user context auth, so maybe https://developer.twitter.com/en/docs/basics/authentication/overview/basic-auth?

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

2 participants