How do I create a reply button for a Twitter client that automatically fills in a username in the 'tweet' form?

StackOverflow https://stackoverflow.com/questions/2868795

문제

Using the Twitter API, and just want to have a simple 'reply' button on every tweet (say, 'How do I create a reply button?' from @kraykray) that automatically puts '@kraykray' into the tweet form. Don't need the system to log that it's any kind of special message.

도움이 되었습니까?

해결책

you can do this with the help of rails javascript helpers or you can use only javascript to handle this problem as well.

Rails way On clicking the reply button call some action and pass the username as params to the action and render your textarea with the username as value for the textarea. Hope this helps

Please let me know if you need code snippets.You can improve the code, I am just trying to explain how you can do with javascript. I dint used jquery or prototype because, I donno which library you use.

Please check this link http://jsbin.com/atodu3/2

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top