Skip to content

Instantly share code, notes, and snippets.

@igorbrigadir
Created February 8, 2023 22:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igorbrigadir/3d6455090915d03f178ea404f2ab043b to your computer and use it in GitHub Desktop.
Save igorbrigadir/3d6455090915d03f178ea404f2ab043b to your computer and use it in GitHub Desktop.
twurl v2 API Posting tweet example
# 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