How to post images with custom Twitter bot, WITHOUT using Twitter API?

INauCkeL

Junior Member
Joined
Jul 24, 2023
Messages
112
Reaction score
30
I'm developing a Twitter bot using Selenium and C# without the Twitter API, aiming to post tweets with text and image URLs.

However, Twitter doesn't display an image preview when I paste the URL directly into the tweet.

My workaround — downloading the image and using the file open dialog — is cumbersome, and I didn't develop it yet.

Is there a more efficient method to ensure Twitter previews the image from the URL, or any alternative approach to automate image posting on Twitter through Selenium and C#?
 
I'm doing similar using a different approach. I'm building the whole scraper in js and running from the dev console. Once the feed is parsed I will save everything to a db, including image and video urls. Later I can download the images if I want. I have used Selenium before but find its getting harder to bypass x's bot detection.
 
Seemly X does not display an image preview by URL, I tried it without the result...
You should download the image and pass it to the file open dialog
 
I tried selenium and it worked fine, however my bot gets detected whenever I use a proxy
 
I personally use tweepy, better and much easier than selenium, but it has a rate limit of 50 post requests per day.
if you don't need to tweet more than 50 times a day switching to tweepy is much much better.
 
To ensure Twitter displays image previews when posting through Selenium and C#, you
can upload the image directly through the Twitter interface instead of pasting the URL. This can
be automated by simulating a file upload action with Selenium, avoiding the need for manual
downloading and uploading.
 
To ensure Twitter displays image previews when posting through Selenium and C#, you
can upload the image directly through the Twitter interface instead of pasting the URL. This can
be automated by simulating a file upload action with Selenium, avoiding the need for manual
downloading and uploading.
How can it be simulated?
 
I'm doing similar using a different approach. I'm building the whole scraper in js and running from the dev console. Once the feed is parsed I will save everything to a db, including image and video urls. Later I can download the images if I want. I have used Selenium before but find its getting harder to bypass x's bot detection.
I find good Residential proxies work perfect, 4G surprisingly lead to more captcha and blocks (perhaps PC UA with Mobile proxy?)

Aside from that, no issues with Twitter using Puppeteer
 
This is a bad time for Twitter bots. Elon Musk has actively limited their reach.
 
Back
Top