This tweet updates itself...https://t.co/FwNRzUaxtu
— Tod Sacerdoti (@tod ) May 20, 2020
In fact, the exact metrics for this tweet are:
- 78374 impressions
- 246 likes
- 42 retweets
- 5 quotes
- 5 replies
The reason the title doesn't include the exact numbers is due to limitations of the Twitter API, which I will get to later.
View the live workflow code here.
This workflow is powered by Pipedream's impossibly fast serverless integration platform and was inspired by similar self-reflexive automation efforts on Hacker News and YouTube.
How this workflow works (in three easy steps):
1. Event Source - emits new events when Tweet Metrics change
Note: Since the Twitter Tweet Metrics API is in preview, you must have your own Twitter developer credentials and activate the preview in your developer account.
2. Code Step - Dev.to post in markdown with title and description
3. Action - update the article using the Dev.to API
Why does the tweet not update in real time?
- Unfortunately, Twitter doesn't update the data of twitter cards in real time, which is why the metrics are rounded in the tweet
- Twitter cards can be updated via the Card Validator
- However, doing this programmatically would violate Twitter's Developer Terms
- Twitter says DO NOT "use non-API-based forms of automation, such as scripting the Twitter website. The use of these techniques may result in the permanent suspension of your account."
Why not build your own?
- View the live workflow code here
- Copy the workflow into your account
- Add your Twitter / Dev.to credentials and make any code changes
- Deploy the workflow and you are live
Top comments (3)
So neat!
Very similar to Tom Scott's self updating video
I've been looking at pipedream, it looks so awesome. I tried using zappier a few months ago but, never did much with it. Thanks for making such a killer product and making engaging example!