admin管理员组文章数量:1318564
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.
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.
Share Improve this question asked May 9, 2011 at 5:36 locoboylocoboy 39k73 gold badges188 silver badges263 bronze badges4 Answers
Reset to default 5"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.
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./home?status=Custom%20status%20here" target="_blank">Post to Twitter!</a>
I found the best solution for me was to reference http://twitter./share on a client side button or anchor tag and use twitter to log-in log-out. Granted the downside is I don't get to customize my look and feel of the input (except for the words that I can default set), but it's the only way I could find the client side to work without OAuth.
<a href="http://twitter./share?url=&" target="_blank">Create a Tweet</a>
Any other ways where I can enable more flexibility in my design are wele.
You can use Twitter's @anywhere using something like this:
twttr.anywhere(function (T) {
T.Status.update("Hello World");
});
More info here: https://dev.twitter./docs/anywhere/wele
本文标签: jqueryTweet using javascriptStack Overflow
版权声明:本文标题:jquery - Tweet using javascript - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742049690a2418000.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论