Note that there are some explanatory texts on larger screens.

plurals
  1. PORuby or C#: how to write a console application to post a status to Twitter
    primarykey
    data
    text
    <p>I was trying to set up a ruby <strong>console</strong> application to post "Hello world" on my Twitter status, but I couldn't pass the authorization. </p> <p>I've seen some tutorials on basic authentication, and it was easy to use basic authentication to create an app. But unfortunately basic authentication has been disabled by twitter, so now we have to use OAuth, which seems much more difficult.</p> <p>Is there a tutorial on how to write a console application to post "Hello World" to Twitter using OAuth? Or is it not possible to use OAuth in a console application?</p> <p>Thanks</p> <p><strong>Edit</strong></p> <p>for Ruby: <a href="https://github.com/jnunemaker/twitter" rel="nofollow">https://github.com/jnunemaker/twitter</a> (provided by Thiago Silveira)</p> <p>for C#: <a href="http://p2p.wrox.com/content/articles/twitter-development-using-oauth-authenticate-against-twitter-api-walkthroughs" rel="nofollow">http://p2p.wrox.com/content/articles/twitter-development-using-oauth-authenticate-against-twitter-api-walkthroughs</a> (provided by Casey) </p> <p>Actually it's quite easy to an "hello world" console app using Ruby. As mentioned by Thiago Silveira, there's a Ruby <strong>twitter gem</strong> <a href="https://github.com/jnunemaker/twitter" rel="nofollow">https://github.com/jnunemaker/twitter</a>, which has pretty good documentation for any Ruby programmer to get started on using twitter. </p> <p><strong>The Caveat</strong></p> <p>The <strong>clock issue</strong> might prevented you from successfully using OAuth. </p> <p>I used Ruby twitter gem before asking this question and couldn't get the OAuth working correct, which is why I asked this question in the first place. The actual problem is that OAuth needs a timestamp in order to get the request token but my <strong>clock wasn't synchronized</strong> with internet clock. (see here: <a href="http://blainegarrett.com/2009/07/14/failed-to-validate-oauth-signature-and-token-on-twitter-oauth-check-your-cloc/" rel="nofollow">http://blainegarrett.com/2009/07/14/failed-to-validate-oauth-signature-and-token-on-twitter-oauth-check-your-cloc/</a>) So after I synced my clock, twitter gem works perfectly well.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload