Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Tweepy to retweet with a comment

So i am stuck trying to figure out how to retweet a tweet with a comment, this was added to twitter recently.

this is when you click retweet and add a comment to the retweet and retweet it. basically this is what i am talking about :

enter image description here

i was looking at the api and count find a method dedicated to this. And even the retweet method does not have a parameter where i can pass text.

So i was wondering is there a way to do this?

like image 746
user4335407 Avatar asked Nov 09 '15 23:11

user4335407


People also ask

How do I retweet a post with a comment?

Tap Retweet. The Tweet will then be shared with your followers as a Quote Tweet. Click Retweet as Quote Tweet. Add your own comment.

How do you reply to a retweet with a comment?

Retweet with a CommentClick on the Retweet icon or retweet symbol. Step 2: Choose the Quote Tweet option. Step 3: A pop-up will appear where you can enter your comment. After that, click on the tweet button.

How do you retweet with Tweepy?

Tweepy doesn't have functionality to retweet with your own text, but what you can do is make a url like this https://twitter.com/<user_displayname>/status/<tweet_id> and include it with the text you want comment. It's not a retweet but you are embedding the tweet in your new tweet. Show activity on this post.

Is retweet with comment the same as quote tweet?

What is the difference between a retweet and a quote tweet? ReTweet is when you share a tweet without adding any comment or words to the actual tweet. Hence, keeping the original tweet and concept tweeted by the user. On the other hand, the re-sharing of the tweet with an added comment is called Quote Tweet.


2 Answers

September 2021 Update

Tweepy does have the functionality to quote retweet. Just provide the url of the tweet you want to quote into attachment_url of the API.update_status method.

Python example:

# Get the tweet you want to quote
tweet_to_quote_url="https://twitter.com/andypiper/status/903615884664725505"

# Quote it in a new status
api.update_status("text", attachment_url=tweet_to_quote_url)

# Done!
like image 198
dvdblk Avatar answered Oct 20 '22 05:10

dvdblk


Tweepy doesn't have functionality to retweet with your own text, but what you can do is make a url like this https://twitter.com/<user_displayname>/status/<tweet_id> and include it with the text you want comment. It's not a retweet but you are embedding the tweet in your new tweet.

user_displayname - display name of person, whose tweet you are retweeting

tweet_id - tweet id of tweet you are retweeting

like image 23
Harwee Avatar answered Oct 20 '22 06:10

Harwee