How do you update the status using only _twitter_sess ?

480 views
Skip to first unread message

aschobel

unread,
Apr 17, 2008, 8:46:05 PM4/17/08
to Twitter Development Talk
I don't want to store username and passwords so I'm looking into using
the _twitter_sess session variable.

I get _twitter_sess from https://twitter.com/account/verify_credentials.json
and it works fine if I want to grab my friend timeline:

curl --cookie "_twitter_sess=xxxxxxxx" http://twitter.com/statuses/friends_timeline.json

but I get a "Could not authenticate you" if I try to hit the update
URL

curl --cookie "_twitter_sess= xxxxxxxx" -d status="testing1234"
http://twitter.com/statuses/update.json


Is my only option to scrape the authenticity_token and siv and make my
request to http://twitter.com/status/update?page=1&tab=home?

I've looked at,

http://www.sakana.fr/blog/2007/03/18/scripting-twitter-with-curl/

to no avail.

Thanks in Advance.

Andreas

Cameron Kaiser

unread,
Apr 18, 2008, 12:43:06 PM4/18/08
to twitter-deve...@googlegroups.com
> I get _twitter_sess from https://twitter.com/account/verify_credentials.json
> and it works fine if I want to grab my friend timeline:
>
> curl --cookie "_twitter_sess=xxxxxxxx" http://twitter.com/statuses/friends_timeline.json
>
> but I get a "Could not authenticate you" if I try to hit the update
> URL
>
> curl --cookie "_twitter_sess= xxxxxxxx" -d status="testing1234"
> http://twitter.com/statuses/update.json

I'm sure this is just a mail glitch, but is there really a space between
_sess= and xxxx?

--
------------------------------------ personal: http://www.cameronkaiser.com/ --
Cameron Kaiser * Floodgap Systems * www.floodgap.com * cka...@floodgap.com
-- Even if you win the rat race, you're still a rat. --------------------------

aschobel

unread,
Apr 18, 2008, 1:13:28 PM4/18/08
to Twitter Development Talk
Good eye, I added the space accidentally when I made the post to the
group.

My testing was sans the space, which still fails.

curl --cookie "_twitter_sess=xxxxxxxxxxxx" -d status="testing1234"
http://twitter.com/statuses/update.json

Cheers,
Andreas

On Apr 18, 9:43 am, Cameron Kaiser <spec...@floodgap.com> wrote:
> > I get _twitter_sess fromhttps://twitter.com/account/verify_credentials.json
> > and it works fine if I want to grab my friend timeline:
>
> > curl --cookie "_twitter_sess=xxxxxxxx"http://twitter.com/statuses/friends_timeline.json
>
> > but I get a "Could not authenticate you" if I try to hit the update
> > URL
>
> > curl --cookie "_twitter_sess= xxxxxxxx" -d status="testing1234"
> >http://twitter.com/statuses/update.json
>
> I'm sure this is just a mail glitch, but is there really a space between
> _sess= and xxxx?
>
> --
> ------------------------------------ personal:http://www.cameronkaiser.com/--
>   Cameron Kaiser * Floodgap Systems *www.floodgap.com* ckai...@floodgap.com

Alex Payne

unread,
Apr 18, 2008, 6:54:15 PM4/18/08
to twitter-deve...@googlegroups.com
We don't support any API actions via cookie sessions. If you get it
working, that's fine, but we don't support it.

--
Alex Payne
http://twitter.com/al3x

aschobel

unread,
Apr 20, 2008, 6:03:26 PM4/20/08
to Twitter Development Talk
Bummer,

Any hints from anybody out there how to get this working?

As a fun side project to get my feet wet with Google's App Engine I
made an iPhone interface for Twitter.

http://3browncow41921.appspot.com/

and the code is here:

http://code.google.com/p/twitterforiphoneappengine/source/browse

Cheers,
Andreas

kosso

unread,
May 12, 2008, 8:58:04 AM5/12/08
to Twitter Development Talk
It would be great to be able to have an authentication token for apps
to post on a user's behalf without having to store their password.

Something similar (but not so complicated) as how the GData webapp
Authentication works for crossposting to Blogger.com

K

Alex Payne

unread,
May 12, 2008, 3:10:08 PM5/12/08
to twitter-deve...@googlegroups.com
We will eventually support OAuth.

--
Alex Payne
http://twitter.com/al3x

Reply all
Reply to author
Forward
0 new messages