Post status with in_reply_to_status_id via javascript api

131 views
Skip to first unread message

Chris

unread,
Nov 22, 2010, 10:31:01 AM11/22/10
to Twitter Development Talk
I am using the anywhere javascript api with great success, except in
regards to posting a reply to a particular status id. I have no
trouble posting the status, and the returned status object including a
reply to user id, but no params I pass come back with an
in_reply_to_status_id with anything other than null.

I have tried lots of things, but from the looks of the api docs here's
what seems most intuitive to me:

T.Status.update('message', {in_reply_to_status_id: '123456789'}); //
where in_reply_to_status_id is part of the options object
-OR-
T.Status.reply('message', '123456789'); //where in_reply_to_status_id
is the second param passed

Can someone tell me what I'm doing wrong, or what is missing?

Matt Harris

unread,
Nov 22, 2010, 2:40:23 PM11/22/10
to twitter-deve...@googlegroups.com
Hi Chris,

The JS-API is considered part of the Internals of @anywhere and isn't supported by Twitter. You are free to experiment with it but please be aware that features and functionality may change or be removed without notice.

With regards to what you are trying to achieve, the TweetBox supports the status update parameters.

You set these parameters by using the 'data' object for the TweetBox. You can put any key: value into the data literal which is supported by the REST API.

Here's an example using the data literal to set the 'in_reply_to_status_id'. 

 twttr.anywhere(function (T) { 
   T("#example-metadata").tweetBox({ 
     'defaultContent' : "@anywhere thanks!", 
     'data' : { 
       'in_reply_to_status_id' : '17889110158' 
     } 
   }); 
 }); 

Best,
@themattharris
Developer Advocate, Twitter
http://twitter.com/themattharris



--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: http://groups.google.com/group/twitter-development-talk

Chris

unread,
Nov 22, 2010, 3:14:53 PM11/22/10
to Twitter Development Talk
Matt,

Thank you for your reply. I will keep tweetbox as an option, but since
I am integrating lots of twitter functionality I am hoping to stick to
a common strategy, which in this case would be using the standard
anywhere methods.

Is there anyone that does support the JS-API?

Thanks much,
Chris
Reply all
Reply to author
Forward
0 new messages