Results 1 to 2 of 2
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 ...
- 10-06-2010 #1Just Joined!
- Join Date
- Oct 2010
- Posts
- 1
Problem using twitter with cURL
I used
I am able to get the session cookies but when i want to tweet acurl --cookie tcookie --cookie-jar tcookie --data
"username_or_email=twitusername&password=twitpass& commit=Sign In"
http:~~twitter.com~login
"direct message" to my friend
When i do
Note: please replace ~ with /. (Forum is not allowing me to post direct urls).curl --cookie tcookie --data "text=Testing cURL" --data 'udpate=send'
--output twitt.html --location http:~~twitter.com~direct_messages~create~friendna me
But nothing happens, it is not working.
Not sure what i missed, any help is much appreciated.
- 10-07-2010 #2
hey man,
I think your problem is due to Twitter (and most other social networking sites) upgrading from BasicAuth, to OAuth authorization when using their API's.
I'm about 98% positive this move to OAuth eliminates the old shell `curl' Twitter trick.
BasicAuth basically just required a username and password in order to gain access to Twitter's API features. OAuth on the other hand alleviates the use of passwords/usernames when using the API. OAuth basically requests access tokens from the specific Twitter application's provided request key/secret tokens.
If you know any Python, I would suggest looking into Tweepy by JoshTheCoder for your Twitter command-line needs =)
(I cannot post URL's to other sites yet as I have < 15 posts here. But in other words, go to `github . com /joshthecoder /tweepy')
Hope this helps!


Reply With Quote