Commenting on my own post is only with a givcen link treated as media and I’m not sure why.
When I do a post using Twitters API using the python tweepy libary (usually media with text) it all works fine:
tweet_posted = client.create_tweet(text=tweet, media_ids=[media_id])
When I comment with plain text there’s no issue as well. But once I include a link for example a youtube video it creates on the media tab an empty spot. Once I deleted the comment only that empty media tab spot is gone.
I think that embedded links with a preview of that link is being treated as a media post which would make sense why it’s being displayed empty.
I execute a comment this way:
comment_post = client.create_tweet(text='COMMENT GOES HERE', in_reply_to_tweet_id=tweet_posted.data['id'])
Is there a way I can avoid that? I was thinking commenting with webscrapping or beautifulsoup/re but this won’t be a secure way for my account as a whole.
Would be amazing to have a solution for this, thank you in adnvance!
iSaanro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.