{"id":488,"date":"2010-06-16T21:58:40","date_gmt":"2010-06-16T20:58:40","guid":{"rendered":"http:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/"},"modified":"2010-06-16T21:58:40","modified_gmt":"2010-06-16T20:58:40","slug":"my-silly-twitter-oauth-command-line-client","status":"publish","type":"post","link":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/","title":{"rendered":"My silly twitter OAuth command line client"},"content":{"rendered":"<p><span class='imgright'><img alt='' src='http:\/\/files.myopera.com\/cstrep\/blog\/twitter.png' \/><\/span> I had the need to test a new My Opera API module that is soon coming out. Since this module, to be named <code>Net::MyOpera<\/code>, is modeled exactly after <a href=\"http:\/\/search.cpan.org\/dist\/Net-Twitter\" rel=\"nofollow\">Net::Twitter<\/a>, I tried changing my example script replacing all <code>Net::MyOpera<\/code> occurrencies to <code>Net::Twitter<\/code>. And there you go, a Twitter command line client was born.<\/p>\n<p>I know, there&#39;s plenty of them already, and as I said, I didn&#39;t really need one, but since it&#39;s there already, it&#39;s nice to have it. So I saved it into my <code>~\/bin<\/code> folder, and aliased to <code>tw<\/code>, so whenever I feel the urge to communicate stupid things to the universe, I can now do that. Ehm wait&#8230; :-)<\/p>\n<p>The <a href=\"http:\/\/github.com\/cosimo\/twitter-oauth-client\" rel=\"nofollow\">code is out on Github<\/a>.<\/p>\n<p>As always, there&#39;s a hidden (poor) excuse for this. And it&#39;s that I&#39;m working to port this Twitter command line client to Perl6. <b>OAuth support needs a good deal of modules<\/b> that are not immediately available for Perl6, so it&#39;s going to be exciting.<\/p>\n<p>First we&#39;re going to need are <a href=\"http:\/\/search.cpan.org\/dist\/Digest-SHA1\" rel=\"nofollow\">Digest::SHA1<\/a>, and <a href=\"http:\/\/search.cpan.org\/dist\/Digest-HMAC\" rel=\"nofollow\">Digest::HMAC<\/a> for the <b>HMAC-SHA1<\/b> signatures. These modules are not impossible to write, except currently there&#39;s a problem using Parrot libraries from Perl6.<\/p>\n<p>I&#39;m trying to do the same for my <a href=\"http:\/\/github.com\/cosimo\/perl6-digest-md5\" rel=\"nofollow\">Perl6 Digest::MD5<\/a> module, but I&#39;m stumbling on the following error:<\/p>\n<p><code><\/p>\n<pre>\r\nt\/perl5-compat.t ... Null PMC access in find_method(&#39;signature&#39;)\r\n  in &#39;Digest::MD5::md5_hex&#39; at line 11:lib\/Digest\/MD5.pm\r\n  in main program body at line 17:t\/perl5-compat.t\r\nt\/perl5-compat.t ... Dubious, test returned 1 (wstat 256, 0x100)\r\n<\/pre>\n<p><\/code><\/p>\n<p>I will need some help on this :-)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had the need to test a new My Opera API module that is soon coming out. Since this module, to be named Net::MyOpera, is modeled exactly after Net::Twitter, I tried changing my example script replacing all Net::MyOpera occurrencies to Net::Twitter. And there you go, a Twitter command line client was born. I know, there&#39;s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[49,363,409,50,290,286,424],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>My silly twitter OAuth command line client - Random hacking<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"My silly twitter OAuth command line client - Random hacking\" \/>\n<meta property=\"og:description\" content=\"I had the need to test a new My Opera API module that is soon coming out. Since this module, to be named Net::MyOpera, is modeled exactly after Net::Twitter, I tried changing my example script replacing all Net::MyOpera occurrencies to Net::Twitter. And there you go, a Twitter command line client was born. I know, there&#039;s [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/\" \/>\n<meta property=\"og:site_name\" content=\"Random hacking\" \/>\n<meta property=\"article:published_time\" content=\"2010-06-16T20:58:40+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/files.myopera.com\/cstrep\/blog\/twitter.png\" \/>\n<meta name=\"author\" content=\"cosimo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"cosimo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/\"},\"author\":{\"name\":\"cosimo\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\"},\"headline\":\"My silly twitter OAuth command line client\",\"datePublished\":\"2010-06-16T20:58:40+00:00\",\"dateModified\":\"2010-06-16T20:58:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/\"},\"wordCount\":235,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\"},\"image\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/files.myopera.com\/cstrep\/blog\/twitter.png\",\"keywords\":[\"cpan\",\"oauth\",\"parrot\",\"perl\",\"perl6\",\"rakudo\",\"twitter\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/\",\"url\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/\",\"name\":\"My silly twitter OAuth command line client - Random hacking\",\"isPartOf\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/files.myopera.com\/cstrep\/blog\/twitter.png\",\"datePublished\":\"2010-06-16T20:58:40+00:00\",\"dateModified\":\"2010-06-16T20:58:40+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/#primaryimage\",\"url\":\"http:\/\/files.myopera.com\/cstrep\/blog\/twitter.png\",\"contentUrl\":\"http:\/\/files.myopera.com\/cstrep\/blog\/twitter.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.streppone.it\/cosimo\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"My silly twitter OAuth command line client\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#website\",\"url\":\"https:\/\/www.streppone.it\/cosimo\/blog\/\",\"name\":\"Random hacking\",\"description\":\"Assume nothing. Code defensively. Keep it simple, stupid!\",\"publisher\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.streppone.it\/cosimo\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\",\"name\":\"cosimo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g\",\"caption\":\"cosimo\"},\"logo\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/www.streppone.it\/cosimo\/blog\/author\/cosimo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"My silly twitter OAuth command line client - Random hacking","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/","og_locale":"en_US","og_type":"article","og_title":"My silly twitter OAuth command line client - Random hacking","og_description":"I had the need to test a new My Opera API module that is soon coming out. Since this module, to be named Net::MyOpera, is modeled exactly after Net::Twitter, I tried changing my example script replacing all Net::MyOpera occurrencies to Net::Twitter. And there you go, a Twitter command line client was born. I know, there&#39;s [&hellip;]","og_url":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/","og_site_name":"Random hacking","article_published_time":"2010-06-16T20:58:40+00:00","og_image":[{"url":"http:\/\/files.myopera.com\/cstrep\/blog\/twitter.png"}],"author":"cosimo","twitter_card":"summary_large_image","twitter_misc":{"Written by":"cosimo","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/#article","isPartOf":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/"},"author":{"name":"cosimo","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1"},"headline":"My silly twitter OAuth command line client","datePublished":"2010-06-16T20:58:40+00:00","dateModified":"2010-06-16T20:58:40+00:00","mainEntityOfPage":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/"},"wordCount":235,"commentCount":0,"publisher":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1"},"image":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/#primaryimage"},"thumbnailUrl":"http:\/\/files.myopera.com\/cstrep\/blog\/twitter.png","keywords":["cpan","oauth","parrot","perl","perl6","rakudo","twitter"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/","url":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/","name":"My silly twitter OAuth command line client - Random hacking","isPartOf":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/#primaryimage"},"image":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/#primaryimage"},"thumbnailUrl":"http:\/\/files.myopera.com\/cstrep\/blog\/twitter.png","datePublished":"2010-06-16T20:58:40+00:00","dateModified":"2010-06-16T20:58:40+00:00","breadcrumb":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/#primaryimage","url":"http:\/\/files.myopera.com\/cstrep\/blog\/twitter.png","contentUrl":"http:\/\/files.myopera.com\/cstrep\/blog\/twitter.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/06\/my-silly-twitter-oauth-command-line-client\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.streppone.it\/cosimo\/blog\/"},{"@type":"ListItem","position":2,"name":"My silly twitter OAuth command line client"}]},{"@type":"WebSite","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#website","url":"https:\/\/www.streppone.it\/cosimo\/blog\/","name":"Random hacking","description":"Assume nothing. Code defensively. Keep it simple, stupid!","publisher":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.streppone.it\/cosimo\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1","name":"cosimo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g","caption":"cosimo"},"logo":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/"},"url":"https:\/\/www.streppone.it\/cosimo\/blog\/author\/cosimo\/"}]}},"_links":{"self":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/posts\/488"}],"collection":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/comments?post=488"}],"version-history":[{"count":0,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/posts\/488\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/media?parent=488"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/categories?post=488"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/tags?post=488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}