Created
February 8, 2023 22:28
-
-
Save igorbrigadir/3d6455090915d03f178ea404f2ab043b to your computer and use it in GitHub Desktop.
twurl v2 API Posting tweet example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace the ... appropriately. | |
# See https://developer.twitter.com/en/docs/twitter-api/tweets/manage-tweets/api-reference/post-tweets | |
# Tweet | |
twurl -X POST -A "Content-type: application/json" -d '{"text":"Simple tweet example"}' "/2/tweets" | |
# Retweet | |
twurl -X POST -A "Content-type: application/json" -d '{"tweet_id":"..."}}' "/2/users/...your_user_id.../retweets" | |
# Quote | |
twurl -X POST -A "Content-type: application/json" -d '{"text":"Quote example", "quote_tweet_id": "..."}' "/2/tweets" | |
# Reply | |
twurl -X POST -A "Content-type: application/json" -d '{"text":"Reply example", "reply": {"in_reply_to_tweet_id": "..."}}' "/2/tweets" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment