Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tweet using javascript

Is there a way to create a client side tweet using javascript, a textbox, and a submit button? The process would be to enter text to tweet into the textbox, press the button then tweet it using an authenticated account all on the client side.

like image 481
locoboy Avatar asked Jan 20 '23 19:01

locoboy


2 Answers

"Yes".

That said, you need to get an authenticated account on the client side. Twitter does expose mostly RESTful API's for all sorts of things including submitting tweets which you would be able to access via AJAX, however the act of logging in may be difficult due to Twitters reliance on OAuth as a login mechanism. I'm not sure how you could get around that in a totally client-side manner.

like image 62
Matthew Scharley Avatar answered Jan 28 '23 13:01

Matthew Scharley


I know this isn't exactly what you're asking for, but you can also have users post to Twitter like this:

<a href="http://twitter.com/home?status=Custom%20status%20here" target="_blank">Post to Twitter!</a>

like image 29
Newtang Avatar answered Jan 28 '23 12:01

Newtang