post from mobile - how to make it easy?

1 view
Skip to first unread message

alle...@gmail.com

unread,
May 20, 2007, 9:27:26 PM5/20/07
to Twitter Development Talk
Hi,

I would like to integrate Twitter posting into the user interface at
TinyTube (http://tinytube.net), a video streaming site targeted at
mobile devices. The idea for integration is to add a link that a user
can click to twitter that they just watched a particular video and
liked it/hated it/whatever.

Forming twitter URLs doesn't seem to work in the obvious way, that's
why I'm here asking for insight. First off, the status update
requires a HTTP POST. That means I CANNOT just make a link like this:

http://m.twitter.com/status/update?source=mobile&status=some+message

Instead I have to:

POST http://m.twitter.com/status/update
source=mobile&status=some+message

What is the purpose of not allowing HTTP GET? If I'm not
authenticated then I won't have a cookie, so there's no trouble with
doing an update from a GET, right? Am I missing something?

So next, I tried this (also DOES NOT work):

http://m.twitter.com/home?status=some+message

which I hoped would match up the status GET parameter with the form
parameter of the same name on the page. Nope, the param is ignored.

So what other options are there? Basically I need to be able make
submission of a twitter as painless as possible for users on mobile
devices. As anyone with a non QWERTY phone can attest to, it takes a
really long time to enter text on a phone, especially a URL.

TIA for any insight the list can offer.

-Allen

Manuel González Noriega

unread,
May 21, 2007, 3:51:00 AM5/21/07
to twitter-deve...@googlegroups.com
On 21/05/07, alle...@gmail.com <alle...@gmail.com> wrote:
>
> Hi,

>
> Forming twitter URLs doesn't seem to work in the obvious way, that's
> why I'm here asking for insight. First off, the status update
> requires a HTTP POST. That means I CANNOT just make a link like this:
>
> http://m.twitter.com/status/update?source=mobile&status=some+message
>
> Instead I have to:
>
> POST http://m.twitter.com/status/update
> source=mobile&status=some+message

Twitter is doing the right thing, as per RFC 2616

"In particular, the convention has been established that the GET and
HEAD methods SHOULD NOT have the significance of taking an action
other than retrieval. These methods ought to be considered "safe". .."

http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html

Resources, such a new status, shall be created by POSTing. Anyway I
don't really see the real difference between doing a post or a get
request, with respect to dificulty of implementation.

"As anyone with a non QWERTY phone can attest to, it takes a
really long time to enter text on a phone, especially a URL."

This I don't really understand, submissions will be from a form on
your site, won't they? What URL exactly must be entered?


Hope to help

--
Manuel, que
piensa que eres una excelente persona y medra en torno a
http://simplelogica.net y/o http://simplelogica.net/logicola/
Recuerda comer mucha fruta y verdura.

alle...@gmail.com

unread,
May 21, 2007, 1:06:26 PM5/21/07
to Twitter Development Talk
Manuel,

The text to be twittered is a URL + optional commetary text. In the
second example I gave (attempting to pre-fill the "status"text field),
it might be:
"watching http://tinytube.net/watch/break/188766"

w/o quotes that's 47 characters and a lot to type on a 12-key phone.
In this case I would really like to be able to link like this:

http://m.twitter.com/home?status=watching%20http%3A%2F%2Ftinytube.net%2Fwatch%2Fbreak%2F188766

and have the status text field filled in automatically. Where is the
correct place to file a feature request for the site?

-Allen


On May 21, 12:51 am, "Manuel González Noriega"
<manuel.gonzalez.nori...@gmail.com> wrote:


> On 21/05/07, allen...@gmail.com <allen...@gmail.com> wrote:
>
>
>
> > Hi,
>
> > Forming twitter URLs doesn't seem to work in the obvious way, that's
> > why I'm here asking for insight. First off, the status update
> > requires a HTTP POST. That means I CANNOT just make a link like this:
>
> >http://m.twitter.com/status/update?source=mobile&status=some+message
>
> > Instead I have to:
>

> > POSThttp://m.twitter.com/status/update


> > source=mobile&status=some+message
>
> Twitter is doing the right thing, as per RFC 2616
>
> "In particular, the convention has been established that the GET and
> HEAD methods SHOULD NOT have the significance of taking an action
> other than retrieval. These methods ought to be considered "safe". .."
>
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
>
> Resources, such a new status, shall be created by POSTing. Anyway I
> don't really see the real difference between doing a post or a get
> request, with respect to dificulty of implementation.
>
> "As anyone with a non QWERTY phone can attest to, it takes a
> really long time to enter text on a phone, especially a URL."
>
> This I don't really understand, submissions will be from a form on
> your site, won't they? What URL exactly must be entered?
>
> Hope to help
>
> --
> Manuel, que

> piensa que eres una excelente persona y medra en torno ahttp://simplelogica.nety/ohttp://simplelogica.net/logicola/

Mario Menti

unread,
May 21, 2007, 1:18:03 PM5/21/07
to twitter-deve...@googlegroups.com

Manuel,

The text to be twittered is a URL + optional commetary text.  In the
second example I gave (attempting to pre-fill the "status"text field),
it might be:
"watching http://tinytube.net/watch/break/188766"

w/o quotes that's 47 characters and a lot to type on a 12-key phone.
In this case I would really like to be able to link like this:

http://m.twitter.com/home?status=watching%20http%3A%2F%2Ftinytube.net%2Fwatch%2Fbreak%2F188766

and have the status text field filled in automatically.  Where is the
correct place to file a feature request for the site?

-Allen

I don't understand... what does user typing have to do with whether you use GET or POST? What stops you from automatically posting the URL? Surely if you can append the URL string to a link, then you can also use it in a POST to the twitter API?

Mario.

alle...@gmail.com

unread,
May 21, 2007, 1:56:37 PM5/21/07
to Twitter Development Talk
Please try to use the example link I have given. My goal is to
eliminate text input interaction for the user. I have so far been
unsuccessful in eliminating the need for the user to interact with the
textfield at http://m.twitter.com . Examples again that illustrate
the problem:

* A nice page would put value "hello" to textfield "status". This
page does not.
--> GET http://m.twitter.com/home?source=mobile&status=hello

* A POST from an external page's form does not work. XML comes back
malformed.
--> POST http://m.twitter.com/status/update
--> source=mobile&status=hello
<-- Sorry, due to abusive behaviour, we have been forced to disable
posting from external websites. If you are posting from an API tool,
please ensure that the HTTP_REFERER header is not set.

-Allen

On May 21, 10:18 am, "Mario Menti" <mme...@gmail.com> wrote:


> On 5/21/07, allen...@gmail.com <allen...@gmail.com> wrote:
>
>
>
>
>
> > Manuel,
>
> > The text to be twittered is a URL + optional commetary text. In the
> > second example I gave (attempting to pre-fill the "status"text field),
> > it might be:

> > "watchinghttp://tinytube.net/watch/break/188766"


>
> > w/o quotes that's 47 characters and a lot to type on a 12-key phone.
> > In this case I would really like to be able to link like this:
>

> >http://m.twitter.com/home?status=watching%20http%3A%2F%2Ftinytube.net...

Mario Menti

unread,
May 21, 2007, 2:23:30 PM5/21/07
to twitter-deve...@googlegroups.com

* A POST from an external page's form does not work.  XML comes back
malformed.
--> POST http://m.twitter.com/status/update
--> source=mobile&status=hello
<-- Sorry, due to abusive behaviour, we have been forced to disable
posting from external websites. If you are posting from an API tool,
please ensure that the HTTP_REFERER header is not set.

-Allen


True, this has been disabled by the twitter guys. You'll need to post programmatically rather than directly from the form, e.g.
http://yoursite.com/twitterupdate?status=hello , where "twitterupdate" (whatever server side technology you may be using) handles the posting to the twitter API.

Also, although I don't know if it matters, I don't think you should post to the mobile ( m.twitter.com) URL, but the standard URLs as specified in the docs (http://groups.google.com/group/twitter-development-talk/web/api-documentation ).

Mario.

Alex Payne

unread,
May 21, 2007, 8:42:53 PM5/21/07
to twitter-deve...@googlegroups.com
Allen,

Manuel's reply above explains all the reasons why we're not going to
change our current policy of requiring POST for updates. I don't mean
to rely too much on this refrain, but other developers have
successfully built mobile applications that can update. Good luck!


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

Manuel González Noriega

unread,
May 22, 2007, 4:51:22 AM5/22/07
to twitter-deve...@googlegroups.com
On 21/05/07, alle...@gmail.com <alle...@gmail.com> wrote:
>
> Please try to use the example link I have given. My goal is to
> eliminate text input interaction for the user. I have so far been
> unsuccessful in eliminating the need for the user to interact with the
> textfield at http://m.twitter.com . Examples again that illustrate
> the problem:
>

Allenday, as Mario and Alex already said, there's nothing on Twitter's
side that's stopping you from doing that.

1 You have a form in your site pointing to an internal url with a
"Twitter this!" submit button
2 You grab the data and POST it to the Twitter endpoint

Easy as pie (of course, if you want to tweet it to the user's own
twitter account instead of a global tinytube account, you still have
to factor the user twitter credentials in)

--
Manuel, que


piensa que eres una excelente persona y medra en torno a

http://simplelogica.net y/o http://simplelogica.net/logicola/

alle...@gmail.com

unread,
May 23, 2007, 6:34:42 AM5/23/07
to Twitter Development Talk
Status update.

Alex has altered the page to allow a GET request to prepopulate the
status textfield. See
http://m.twitter.com/home?status=it+works+now

Thanks Alex!

-Allen

On May 22, 1:51 am, "Manuel González Noriega"
<manuel.gonzalez.nori...@gmail.com> wrote:


> On 21/05/07, allen...@gmail.com <allen...@gmail.com> wrote:
>
>
>
> > Please try to use the example link I have given. My goal is to
> > eliminate text input interaction for the user. I have so far been
> > unsuccessful in eliminating the need for the user to interact with the

> > textfield athttp://m.twitter.com. Examples again that illustrate


> > the problem:
>
> Allenday, as Mario and Alex already said, there's nothing on Twitter's
> side that's stopping you from doing that.
>
> 1 You have a form in your site pointing to an internal url with a
> "Twitter this!" submit button
> 2 You grab the data and POST it to the Twitter endpoint
>
> Easy as pie (of course, if you want to tweet it to the user's own
> twitter account instead of a global tinytube account, you still have
> to factor the user twitter credentials in)
>
> --
> Manuel, que

> piensa que eres una excelente persona y medra en torno ahttp://simplelogica.nety/ohttp://simplelogica.net/logicola/

Alex Mou

unread,
May 23, 2007, 8:43:42 AM5/23/07
to twitter-deve...@googlegroups.com
Hmm, you got more than you asked for. This works too:
http://twitter.com/home?status=it+works+now (sans m.)

Both mobile and regular web twitters work with pre-filled content.
This opened a lot of doors for the likes of "twitter this".

Alex
twitter.com/aleksoft

Alex Payne

unread,
May 23, 2007, 1:52:09 PM5/23/07
to twitter-deve...@googlegroups.com
You got it, Alex. As long as the user can confirm what they're being
asked to Twitter, we think "Twitter this" links are a great idea.

alle...@gmail.com

unread,
May 23, 2007, 7:22:32 PM5/23/07
to Twitter Development Talk
Yeah, I see it too. Great.

Here's my final update. I have added "twitter this" links to the
desktop and mobile versions of http://tinytube.net . E.g.

http://tinytube.net/search?q=video%3Agoogle%3A8513301804579082716

Most SMS readers that I have seen allow selecting the link, so now we
have a mechanism for going viral over SMS. Yay!

-Allen


On May 23, 5:43 am, "Alex Mou" <alex....@gmail.com> wrote:
> Hmm, you got more than you asked for. This works too:http://twitter.com/home?status=it+works+now(sans m.)


>
> Both mobile and regular web twitters work with pre-filled content.
> This opened a lot of doors for the likes of "twitter this".
>
> Alex
> twitter.com/aleksoft
>

Alex Payne

unread,
May 23, 2007, 7:38:45 PM5/23/07
to twitter-deve...@googlegroups.com
Nice! Very cool.

On 5/23/07, alle...@gmail.com <alle...@gmail.com> wrote:
>

Reply all
Reply to author
Forward
0 new messages