node-red / node-red-nodes

Extra nodes for Node-RED
Other
987 stars 592 forks source link

Plan for upcoming Twitter API deprecation #443

Open knolleary opened 6 years ago

knolleary commented 6 years ago

Twitter have now confirmed a date for when some of their deprecated APIs will be turned off. We need to get the Twitter node updated as soon as possible to minimise the disruption this will bring.

Most of the functionality is still available, but not all...

Twitter In

Twitter Out

knolleary commented 6 years ago

@andypiper I think I have covered everything above. Are you aware of an up to date node.js client library? We use twitter-ng which is riddled with deprecated APIs and don't really want to take on the task of updating it.

ukmoose commented 6 years ago

Is the node also impacted by the requirement to whitelist callback urls as part of the OAuth step? This change comes in in 20 days.

https://twittercommunity.com/t/sign-in-with-twitter-users-must-whitelist-callback-urls/105342

knolleary commented 6 years ago

Sigh. Yes. That breaks us completely.

andypiper commented 6 years ago

Unfortunately the callback URL thing is critically important (to implement on the Twitter sidee, and in terms of the impact on the developer side). It means each instance of NR would need its own API key and secret - which to be honest is a better way of doing things, as it means that they are not all competing for rate limit on connections. It is a much greater setup overhead though, which is a shame.

Not currently aware of better Node implementations, our Account Activity Dashboard sample is doing things directly in Node rather than relying on specific library wrappers.

Why would the AA API webhooks be a blocker - NR can present an additional flow or set of flows that provide the callback endpoints, potentially? I'll have a play with this.

knolleary commented 6 years ago

Just to record progress, got the Twitter In node updated locally to use the apis described above. One side effect is you hit the rate limit really easily if you deploy more than 15 times in 15 minutes - something the old streaming api was more tolerant of. May need to turn-down the polling frequency to make it slightly more tolerant.

We cannot use the AccountActivity api for the simple fact that many of our users run on home networks where they cannot expose the necessary webhooks on the public internet safely.

It would be less of an issue with cloud-hosted instances - but we simply don't have the resources to maintain multiple versions of the node. The fact I'm only now beginning to look at the changes needed without only about 20 days to go before the old apis are turned off reflects the fact that no-one else has offered to help on it. I hope to get the node updated by the deadline, but equally, I have a 10 day holiday between now and then.

Yukibashiri commented 5 years ago

Any news?

knolleary commented 5 years ago

News about what? The Twitter node has been updated inline with the comments above. Your comment has reminded me this can be closed.

knolleary commented 5 years ago

Ah right. This issue was primarily focused on the API changes that were introduced - all of which were fixed in the Twitter node. I forgot I had also used this issue to track updates to support 280 chars - something that hasn't been done. The main issue is the library we use under the covers doesn't support it and is not actively maintained. So until someone reimplements the streaming support we use from that library, not much is going to happen here.

I'll reopen so to stays on the todo list.