update/status api is recognizing only the first word of the tweet :( please help

1 view
Skip to first unread message

goodtest

unread,
Jul 3, 2009, 2:14:32 PM7/3/09
to Twitter Development Talk
I thought everything was working until i just sent a tweet with 4
words, but only the first word is being posted for some reason. Please
help .
I think i have done all the url encoding stuffs, but somehow twitter
is only recognizing first word. What am i missing?


Url:
http://twitter.com/statuses/update.json?status=one two three
Post headers:
oauth_consumer_key=Xz2BKOKObTzpLrMXxJo2ww&oauth_nonce=Pz9MVSTc2EX&oauth_signature_method=HMAC-
SHA1&oauth_timestamp=1246644337&oauth_token=52243094-
N6lnC60D5ZY4rl1OVaemffKaqGas5aVJqAj220ykt&oauth_version=1.0&oauth_token=52243094-
N6lnC60D5ZY4rl1OVaemffKaqGas5aVJqAj220ykt&oauth_signature=i9NB
+T6OQRzeQkikXMYmhwONRTM=


encoded form:

http%3A%2F%2Ftwitter.com%2Fstatuses%2Fupdate.json%3Fstatus%3Done%20two
%20three

oauth_consumer_key%3DXz2BKOKObTzpLrMXxJo2ww%26oauth_nonce%3DJKBGe9GKQCM
%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
%3D1246644748%26oauth_token%3D52243094-
N6lnC60D5ZY4rl1OVaemffKaqGas5aVJqAj220ykt%26oauth_version
%3D1.0%26oauth_token%3D52243094-
N6lnC60D5ZY4rl1OVaemffKaqGas5aVJqAj220ykt%26oauth_signature
%3D7RyC21EJdprquTFdbQV2lq0IIqY%3D


In the response.. it says:
"text":"one"

{"text":"one","favorited":false,"user":
{"profile_link_color":"088253","description":null,"profile_background_tile"
:false,"utc_offset":-28800,"verified":false,"profile_background_color":"EDECE9","followers_count":
10
,"profile_image_url":"http:\/\/static.twitter.com\/images\/
default_profile_normal.png","friends_count"
:
15,"profile_sidebar_fill_color":"E3E2DE","url":null,"screen_name":"rajaraodv","name":"rajaraodv","created_at"
:"Sun Jun 22 16:10:53 +0000
2008","protected":false,"profile_sidebar_border_color":"D3D2CF","time_zone"
:"Pacific Time (US & Canada)","following":null,"statuses_count":
23,"profile_text_color":"634047","location"
:null,"id":
15198474,"notifications":null,"profile_background_image_url":"http:\/\/
static.twitter.com
\/images\/themes\/theme3\/bg.gif","favourites_count":
0},"in_reply_to_screen_name":null,"created_at":"Fri
Jul 03 18:05:43 +0000
2009","truncated":false,"in_reply_to_status_id":null,"id":
2457422831,"in_reply_to_user_id"
:null,"source":"<a href=\"http:\/\/apiwiki.twitter.com\/\">API<\/a>"}


please help, what am i missing?

Stuart

unread,
Jul 3, 2009, 3:07:31 PM7/3/09
to twitter-deve...@googlegroups.com
2009/7/3 goodtest <goodt...@gmail.com>:

First of all, "one two three" is 3 words so you'll never get Twitter
to recognise it as 4.

Secondly you need to url encode the text you're passing in the status
parameter, i.e.

http://twitter.com/statuses/update.json?status=one%20two%20three

-Stuart

--
http://stut.net/projects/twitter

goodtest

unread,
Jul 3, 2009, 3:58:21 PM7/3/09
to Twitter Development Talk
thanks for the quick reply. I tried not encoding the url part of it,
but still twitter only recognizes the first word :(

http://twitter.com/statuses/update.json?oauth_consumer_key%3DXz2BKOKObTzpLrMXxJo2ww%26oauth_nonce%3Di3TKQ5uESfn%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1246650817%26oauth_token%3D52243094-N6lnC60D5ZY4rl1OVaemffKaqGas5aVJqAj220ykt%26oauth_version%3D1.0%26oauth_token%3D52243094-N6lnC60D5ZY4rl1OVaemffKaqGas5aVJqAj220ykt%26oauth_signature%3D2DNoZ4XmCaSDFKEZwOW%2FtLRCuC8%3D%26status%3Done%20two%20three

response:

{"in_reply_to_status_id":null,"text":"one","user":
{"notifications":false,"description":null,"verified"
:false,"utc_offset":null,"friends_count":
20,"profile_text_color":"000000","profile_background_image_url"
:"http:\/\/static.twitter.com\/images\/themes\/theme1\/
bg.gif","profile_image_url":"http:\/\/static.twitter
.com\/images\/default_profile_normal.png","statuses_count":
18,"favourites_count":0,"profile_link_color"
:"0000ff","profile_background_tile":false,"url":null,"screen_name":"tweetzi1","name":"tweetzi1","created_at"
:"Tue Jun 30 00:25:14 +0000
2009","profile_background_color":"9ae4e8","protected":false,"profile_sidebar_fill_color"
:"e0ff92","following":false,"profile_sidebar_border_color":"87bc44","location":null,"id":
52243094,"time_zone"
:null,"followers_count":
5},"in_reply_to_user_id":null,"favorited":false,"created_at":"Fri Jul
03 19:53
:38 +0000 2009","in_reply_to_screen_name":null,"truncated":false,"id":
2458885220,"source":"<a href=\"http
:\/\/gallery.zimbra.com\">Zimbra Collaboration Suite<\/a>"}

On Jul 3, 12:07 pm, Stuart <stut...@gmail.com> wrote:
> 2009/7/3 goodtest <goodtest...@gmail.com>:
>
>
>
>
>
> > I thought everything was working until i just sent a tweet with 4
> > words, but only the first word is being posted for some reason. Please
> > help .
> > I think i have done all the url encoding stuffs, but somehow twitter
> > is only recognizing first word. What am i missing?
>
> > Url:
> >http://twitter.com/statuses/update.json?status=onetwo three

Stuart

unread,
Jul 3, 2009, 4:06:22 PM7/3/09
to twitter-deve...@googlegroups.com
2009/7/3 goodtest <goodt...@gmail.com>:

>
> thanks for the quick reply.   I tried not encoding the url part of it,
> but still twitter only recognizes the first word :(
>
> http://twitter.com/statuses/update.json?oauth_consumer_key%3DXz2BKOKObTzpLrMXxJo2ww%26oauth_nonce%3Di3TKQ5uESfn%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1246650817%26oauth_token%3D52243094-N6lnC60D5ZY4rl1OVaemffKaqGas5aVJqAj220ykt%26oauth_version%3D1.0%26oauth_token%3D52243094-N6lnC60D5ZY4rl1OVaemffKaqGas5aVJqAj220ykt%26oauth_signature%3D2DNoZ4XmCaSDFKEZwOW%2FtLRCuC8%3D%26status%3Done%20two%20three
>
> response:
>
> {"in_reply_to_status_id":null,"text":"one","user":
> {"notifications":false,"description":null,"verified"
> :false,"utc_offset":null,"friends_count":
> 20,"profile_text_color":"000000","profile_background_image_url"
> :"http:\/\/static.twitter.com\/images\/themes\/theme1\/
> bg.gif","profile_image_url":"http:\/\/static.twitter
> .com\/images\/default_profile_normal.png","statuses_count":
> 18,"favourites_count":0,"profile_link_color"
> :"0000ff","profile_background_tile":false,"url":null,"screen_name":"tweetzi1","name":"tweetzi1","created_at"
> :"Tue Jun 30 00:25:14 +0000
> 2009","profile_background_color":"9ae4e8","protected":false,"profile_sidebar_fill_color"
> :"e0ff92","following":false,"profile_sidebar_border_color":"87bc44","location":null,"id":
> 52243094,"time_zone"
> :null,"followers_count":
> 5},"in_reply_to_user_id":null,"favorited":false,"created_at":"Fri Jul
> 03 19:53
> :38 +0000 2009","in_reply_to_screen_name":null,"truncated":false,"id":
> 2458885220,"source":"<a href=\"http
> :\/\/gallery.zimbra.com\">Zimbra Collaboration Suite<\/a>"}

Encode just the values in the query string, not the entire thing. This
is pretty basic URL stuff, I suggest do some research into URL basics
before continuing since you clearly don't understand what you're
doing. Google can help you here.

-Stuart

--
http://stut.net/projects/twitter

goodtest

unread,
Jul 3, 2009, 5:21:26 PM7/3/09
to Twitter Development Talk
ah I cant believe I was missing such basic point. Thanks again
(especially for responding on a long weekend), it works now!


On Jul 3, 1:06 pm, Stuart <stut...@gmail.com> wrote:
> 2009/7/3 goodtest <goodtest...@gmail.com>:
>
>
>
>
>
>
>
> > thanks for the quick reply.   I tried not encoding the url part of it,
> > but still twitter only recognizes the first word :(
>
> >http://twitter.com/statuses/update.json?oauth_consumer_key%3DXz2BKOKO...
>
> > response:
>
> > {"in_reply_to_status_id":null,"text":"one","user":
> > {"notifications":false,"description":null,"verified"
> > :false,"utc_offset":null,"friends_count":
> > 20,"profile_text_color":"000000","profile_background_image_url"
> > :"http:\/\/static.twitter.com\/images\/themes\/theme1\/
> > bg.gif","profile_image_url":"http:\/\/static.twitter
> > .com\/images\/default_profile_normal.png","statuses_count":
> > 18,"favourites_count":0,"profile_link_color"
> > :"0000ff","profile_background_tile":false,"url":null,"screen_name":"tweetzi­1","name":"tweetzi1","created_at"
> > :"Tue Jun 30 00:25:14 +0000
> > 2009","profile_background_color":"9ae4e8","protected":false,"profile_sideba­r_fill_color"
> > :"e0ff92","following":false,"profile_sidebar_border_color":"87bc44","locati­on":null,"id":
> > 52243094,"time_zone"
> > :null,"followers_count":
> > 5},"in_reply_to_user_id":null,"favorited":false,"created_at":"Fri Jul
> > 03 19:53
> > :38 +0000 2009","in_reply_to_screen_name":null,"truncated":false,"id":
> > 2458885220,"source":"<a href=\"http
> > :\/\/gallery.zimbra.com\">Zimbra Collaboration Suite<\/a>"}
>
> Encode just the values in the query string, not the entire thing. This
> is pretty basic URL stuff, I suggest do some research into URL basics
> before continuing since you clearly don't understand what you're
> doing. Google can help you here.
>
> -Stuart
>
> --http://stut.net/projects/twitter
>
>
>
> > On Jul 3, 12:07 pm, Stuart <stut...@gmail.com> wrote:
> >> 2009/7/3 goodtest <goodtest...@gmail.com>:
>
> >> > I thought everything was working until i just sent a tweet with 4
> >> > words, but only the first word is being posted for some reason. Please
> >> > help .
> >> > I think i have done all the url encoding stuffs, but somehow twitter
> >> > is only recognizing first word. What am i missing?
>
> >> > Url:
> >> >http://twitter.com/statuses/update.json?status=onetwothree
> >> > Post headers:
> >> > oauth_consumer_key=Xz2BKOKObTzpLrMXxJo2ww&oauth_nonce=Pz9MVSTc2EX&oauth_sig­nature_method=HMAC-
> >> > SHA1&oauth_timestamp=1246644337&oauth_token=52243094-
> >> > N6lnC60D5ZY4rl1OVaemffKaqGas5aVJqAj220ykt&oauth_version=1.0&oauth_token=522­43094-
> >> > N6lnC60D5ZY4rl1OVaemffKaqGas5aVJqAj220ykt&oauth_signature=i9NB
> >> > +T6OQRzeQkikXMYmhwONRTM=
>
> >> > encoded form:
>
> >> > http%3A%2F%2Ftwitter.com%2Fstatuses%2Fupdate.json%3Fstatus%3Done%20two
> >> > %20three
>
> >> > oauth_consumer_key%3DXz2BKOKObTzpLrMXxJo2ww%26oauth_nonce%3DJKBGe9GKQCM
> >> > %26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
> >> > %3D1246644748%26oauth_token%3D52243094-
> >> > N6lnC60D5ZY4rl1OVaemffKaqGas5aVJqAj220ykt%26oauth_version
> >> > %3D1.0%26oauth_token%3D52243094-
> >> > N6lnC60D5ZY4rl1OVaemffKaqGas5aVJqAj220ykt%26oauth_signature
> >> > %3D7RyC21EJdprquTFdbQV2lq0IIqY%3D
>
> >> > In the response.. it says:
> >> > "text":"one"
>
> >> > {"text":"one","favorited":false,"user":
> >> > {"profile_link_color":"088253","description":null,"profile_background_tile"
> >> > :false,"utc_offset":-28800,"verified":false,"profile_background_color":"EDE­CE9","followers_count":
> >> > 10
> >> > ,"profile_image_url":"http:\/\/static.twitter.com\/images\/
> >> > default_profile_normal.png","friends_count"
> >> > :
> >> > 15,"profile_sidebar_fill_color":"E3E2DE","url":null,"screen_name":"rajaraod­v","name":"rajaraodv","created_at"
> >> > :"Sun Jun 22 16:10:53 +0000
> >> > 2008","protected":false,"profile_sidebar_border_color":"D3D2CF","time_zone"
> >> > :"Pacific Time (US & Canada)","following":null,"statuses_count":
> >> > 23,"profile_text_color":"634047","location"
> >> > :null,"id":
> >> > 15198474,"notifications":null,"profile_background_image_url":"http:\/\/
> >> > static.twitter.com
> >> > \/images\/themes\/theme3\/bg.gif","favourites_count":
> >> > 0},"in_reply_to_screen_name":null,"created_at":"Fri
> >> >  Jul 03 18:05:43 +0000
> >> > 2009","truncated":false,"in_reply_to_status_id":null,"id":
> >> > 2457422831,"in_reply_to_user_id"
> >> > :null,"source":"<a href=\"http:\/\/apiwiki.twitter.com\/\">API<\/a>"}
>
> >> > please help, what am i missing?
>
> >> First of all, "one two three" is 3 words so you'll never get Twitter
> >> to recognise it as 4.
>
> >> Secondly you need to url encode the text you're passing in the status
> >> parameter, i.e.
>
> >>    http://twitter.com/statuses/update.json?status=one%20two%20three
>
> >> -Stuart
>
> >> --http://stut.net/projects/twitter- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

Stuart

unread,
Jul 3, 2009, 5:27:36 PM7/3/09
to twitter-deve...@googlegroups.com
2009/7/3 goodtest <goodt...@gmail.com>:

>
> ah I cant believe I was missing such basic point.  Thanks again
> (especially for responding on a long weekend), it works now!

Ahh, the good old attitude that the whole world is American. The rest
of us are out here ya know - we have our own timezones and
everything!!

-Stuart

--
http://stut.net/projects/twitter

Andrew Badera

unread,
Jul 3, 2009, 5:35:15 PM7/3/09
to twitter-deve...@googlegroups.com
On Fri, Jul 3, 2009 at 5:27 PM, Stuart<stu...@gmail.com> wrote:
>
> 2009/7/3 goodtest <goodt...@gmail.com>:
>>
>> ah I cant believe I was missing such basic point.  Thanks again
>> (especially for responding on a long weekend), it works now!
>
> Ahh, the good old attitude that the whole world is American. The rest
> of us are out here ya know - we have our own timezones and
> everything!!
>
> -Stuart

Ahh but CNN tells us the 4th of July isn't just for the US anymore:

http://www.cnn.com/2009/TRAVEL/07/03/international.july4/index.html

And CNN's word is law. Get with the program. You probably watch
Al-Jazeera, untranslated don't you? You foreign devil.

Reply all
Reply to author
Forward
0 new messages