Twitter Template Code and Username/password/connectivity validation

Hi,
Has anyone has any luck in getting the Twitter template code to work?

I would like to tweet to a Twitter account via an App.

The code appears to have no validation in terms of username, password, network availability.
The tweet is sent and just disappears into the ether.

From looking through the code, it appears that single http request is launched with the username, password and the tweet:

 http.request {   
 url = "http://" .. username .. ":" .. password .. "@twitter.com/statuses/update.json",  
 method = "POST",  
 headers = headerTable,  
 source = ltn12.source.string( postBody )  
 }  

Could someone point me in the right direction on how to:
a) add error checking
b) get the template code working at all!

Thanks for your help! I’ll be happy to share the final working code if I can get this resolved.

  • Nuimo

[import]uid: 87194 topic_id: 26493 reply_id: 326493[/import]

That’s not a valid option anymore. They are now using a REST library in which you need to do an a layer of authentication before making calls. [import]uid: 49520 topic_id: 26493 reply_id: 107485[/import]

Thanks for your help! Do you have any pointers to example code?

Perhaps Ansca can provide an example? [import]uid: 87194 topic_id: 26493 reply_id: 107492[/import]

Just found out that the latest Daily build includes a Twitter example which works!

Great! [import]uid: 87194 topic_id: 26493 reply_id: 107543[/import]