Hi,
I am trying to tweet direct message to friend account using curl.
Below is the form of twitter login page -
http://twitter.com/login
<form method="post" class="signin" action="https://twitter.com/
sessions"><div style="margin: 0pt; padding: 0pt;"><input type="hidden"
value="4ad181cd7c23bb9cf5691e95e9b5f60545f7e91e"
name="authenticity_token"></div> <input type="hidden"
value="4ad181cd7c23bb9cf5691e95e9b5f60545f7e91e"
name="authenticity_token" id="authenticity_token"> <input
type="hidden" name="return_to_ssl" id="return_to_ssl"> <input
type="hidden" name="redirect_after_login" id="redirect_after_login">
<fieldset class="common-form standard-form">
<table cellspacing="0">
<tbody><tr>
<th><label for="username_or_email">Username or email</label></
th>
<td><input type="text" value=""
name="session[username_or_email]" id="username_or_email"></td>
</tr>
<tr>
<th><label for="password">Password</label></th>
<td><input type="password" value="" name="session[password]"
id="password"> <small><a href="/account/resend_password">Forgot?</a></
small></td>
</tr>
<tr>
<th></th>
<td><input type="checkbox" value="1" name="remember_me"
id="remember_me"> <label class="inline" for="remember_me">Remember me</
label></td>
</tr>
<tr>
<th></th>
<td><input type="submit" value="Sign In" name="commit"
id="signin_submit" class="btn btn-m"></td>
</tr>
<tr>
<th></th>
<td>
<p>If you’ve been using Twitter from your phone, <a href="/
account/complete">click here</a> to sign up on the web.</p>
</td>
</tr>
</tbody></table>
</fieldset>
</form>
I used
curl --cookie tcookie --cookie-jar tcookie --data
"username_or_email=twitusername&password=twitpass&commit=Sign In"
http://twitter.com/login
I am able to get the session cookies but when i want to tweet a
"direct message" to my friend
This is the form in
http://twitter.com/direct_messages/create/friendname
<form name="f" method="post" id="direct_message_form" class="status-
update-form" action="/direct_messages/create/friendname"><div
style="margin: 0pt; padding: 0pt;"><input type="hidden"
value="4ad181cd7c23bb9cf5691e95e9b5f60545f7e91e"
name="authenticity_token"></div>
<div class="direct-message-box">
<fieldset class="common-form standard-form">
<div class="bar">
<h3>
<label for="doing">Send <a href="http://twitter.com/
freindname">friendname</a> a message.</label>
</h3>
<span class="numeric" id="chars_left_notice">
<strong class="char-counter" id="status-field-char-counter"
style="color: rgb(204, 204, 204);">140</strong>
</span>
</div>
<div class="info">
<textarea rows="3" name="text" id="text" cols="15"></textarea>
</div>
<div class="status-btn">
<input type="submit" class="round-btn btn-disabled" id="dm-
submit" value="send" name="update" disabled="">
</div>
</fieldset>
</div>
</form>
When i do
curl --cookie tcookie --data "text=Testing cURL" --data 'udpate=send'
--output twitt.html --location
http://twitter.com/direct_messages/create/friendname
But nothing happens, it is not working.
Not sure what i missed, any help is much appreciated.