Many people share twitter tweet image to other social platforms like instagram , facebook, linkedin etc.. So might be useful while automating something or even getting tweet if you're lazy enough to screenshot and crop it. ¯\(ツ)/¯
Deploy this repo to heroku.
https://your-deployment.herokuapp.com
will be base URL.
Endpoint:
/image
will return a image of tweet given certain parameters are passed as query.
query | result | values |
---|---|---|
timeline | Adds time & date to the image. | true or false |
stats | Adds tweets stats to the image. | true or false |
actions | Adds actions to the image. | true or false |
Note : If you are adding stats , timeline needs to added and if you are adding actions stats needs to be added.
Suppose the tweet url is : https://twitter.com/rohanpdofficial/status/1341019325474344968
- Getting default image :
API URL :
https://your-deployment.herokuapp.com/image?link=https://twitter.com/rohanpdofficial/status/1341019325474344968
2. Getting image with date & time :
API URL : https://your-deployment.herokuapp.com/image?link=https://twitter.com/rohanpdofficial/status/1341019325474344968&timeline=true
-
Getting image with date & time & stats : API URL :
https://your-deployment.herokuapp.com/image?link=https://twitter.com/rohanpdofficial/status/1341019325474344968&timeline=true&stats=true
- Getting image with date & time & stats & actions:
API URL :
https://your-deployment.herokuapp.com/image?link=https://twitter.com/rohanpdofficial/status/1341019325474344968&timeline=true&stats=true&actions=true
⭐ this repo
Make sure that you have Node & NPM installed and go inside the cloned directory & follow these steps.
-
Install dependencies
npm install
cd client && npm install
-
Run and Enjoy
npm run dev
Simple Note : /client runs a react app while the base folder is a node app.
MIT © rohanprasadofficial
Crafted & Developed in India by Rohan with ❤️