Help automating logging into Twitter

BlackHatSoda

Regular Member
Oct 6, 2009
393
327
I'm trying to write a bot in .NET and running into issues logging into Twitter. I don't want to use the Twitter API but make it look like someone is logging in normally via their browser.

I'm passing all the cookies in and all the form values. I've watched all the data going back and forth using Fiddler to make sure I'm getting all the form field values but I keep running into a 417 Expectation Failed error.

Anyone know of a code example of how to programatically log into Twitter?
 
Instead buy Tweet Attacks,the ready made solution.

Why would he buy it? If he has some programming knowledge he could make his own for free and while doing it learn new things.

1. First load the twitter homepage (so the initial cookies get saved)
2. Then:

What you need to do is pass the values below via POST to https://twitter.com/sessions

authenticity_token=TOKEN_HERE&return_to_ssl=false&session%5Busername_or_email%5D=USERNAME_HERE&session%5Bpassword%5D=PASSWORD_HERE&q=

You will first need to parse the TOKEN from the website response using regex.
Html code:

<input type="hidden" value="41fc11b1fd0ba6c68f6d74de35e3b5cf13dad519" name="authenticity_token" id="authenticity_token">

Did you do everything above?
 
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features and essential functions on BlackHatWorld and other forums. These functions are unrelated to ads, such as internal links and images. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock