{"id":279,"date":"2011-10-25T00:46:45","date_gmt":"2011-10-24T23:46:45","guid":{"rendered":"http:\/\/wobable.com\/?p=279"},"modified":"2011-10-25T01:13:52","modified_gmt":"2011-10-25T00:13:52","slug":"tweeting-straight-from-a-qr-code-can-it-be-done","status":"publish","type":"post","link":"https:\/\/wobable.com\/?p=279","title":{"rendered":"Tweeting straight from a QR code &#8211; CAN IT BE DONE??"},"content":{"rendered":"<p>Earlier this evening, I published a slightly obtuse tweet:<\/p>\n<p style=\"text-align: left;\"><a href=\"https:\/\/wobable.com\/wp-content\/uploads\/2011\/10\/WobableTweet1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-283 aligncenter\" title=\"WobableTweet\" src=\"https:\/\/wobable.com\/wp-content\/uploads\/2011\/10\/WobableTweet1.png\" alt=\"\" width=\"351\" height=\"181\" srcset=\"https:\/\/wobable.com\/wp-content\/uploads\/2011\/10\/WobableTweet1.png 502w, https:\/\/wobable.com\/wp-content\/uploads\/2011\/10\/WobableTweet1-300x154.png 300w, https:\/\/wobable.com\/wp-content\/uploads\/2011\/10\/WobableTweet1-150x77.png 150w, https:\/\/wobable.com\/wp-content\/uploads\/2011\/10\/WobableTweet1-400x206.png 400w\" sizes=\"auto, (max-width: 351px) 100vw, 351px\" \/><\/a>I have been reading about <a href=\"https:\/\/dev.twitter.com\/docs\/intents\" target=\"_blank\">Twitter web intents<\/a> &#8211; these are URLs that Twitter interprets to do something on your behalf. Unlike most of the Twitter API, they don&#8217;t involve complex oAuth authentication, because Twitter presents the screen ready for the user to make the final button press &#8211; i.e the final action isn&#8217;t automated. They also mean the user is not having to authorise yet another app, for a simple (probably one-off) interaction.<\/p>\n<p style=\"text-align: left;\">For instance, click <a href=\"http:\/\/www.twitter.com\/intent\/tweet?in_reply_to=128569788623634432\">here<\/a>\u00a0to reply to that obtuse tweet. You will be taken to the twitter website, where you might be asked to log in to Twitter, but you won&#8217;t be authorising an app of any sort &#8211; and it is very clear what is happening throughout the process, The whole thing with intents is that it is very transparent.<\/p>\n<p style=\"text-align: left;\">One of the cool things that I thought of, but no-one seems to have cottoned on to, is that the web intents could be encoded into QR Codes. This links paper with Twitter &#8211; coolio!<\/p>\n<p style=\"text-align: left;\">This QR Code allows you to reply to my tweet above:<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/chart.apis.google.com\/chart?cht=qr&amp;chs=350x350&amp;chl=http%3A%2F%2Fwww.twitter.com%2Fintent%2Ftweet%3Fin_reply_to%3D128569788623634432\" alt=\"Reply to my earlier tweet\" width=\"200\" height=\"200\" \/><\/p>\n<p style=\"text-align: left;\">Go on &#8211; try it!<\/p>\n<p style=\"text-align: right;\"><em>Next page: Now read more about the technique&#8230;<\/em><br \/>\n<!--nextpage--><\/p>\n<h1>So how did I do that? and what can we do with it?<\/h1>\n<p>The URL that the QR Code encodes is\u00a0<a href=\"http:\/\/www.twitter.com\/intent\/tweet?in_reply_to=128569788623634432\">http:\/\/www.twitter.com\/intent\/tweet?in_reply_to=128569788623634432<\/a><\/p>\n<p>The only bit that you change (so users are replying to one of your tweets, not one of mine!) is the long number at the end (the Twitter Status ID).<\/p>\n<p>The easiest way to find the Status ID is by viewing the individual tweet on twitter.com (In the timeline, click on the time for the particular tweet you want to view) and reading it from the URL.<\/p>\n<p><a href=\"https:\/\/wobable.com\/wp-content\/uploads\/2011\/10\/Wobable_tweet_ID.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-284\" title=\"Wobable_tweet_ID\" src=\"https:\/\/wobable.com\/wp-content\/uploads\/2011\/10\/Wobable_tweet_ID-300x155.jpg\" alt=\"\" width=\"300\" height=\"155\" srcset=\"https:\/\/wobable.com\/wp-content\/uploads\/2011\/10\/Wobable_tweet_ID-300x155.jpg 300w, https:\/\/wobable.com\/wp-content\/uploads\/2011\/10\/Wobable_tweet_ID-150x77.jpg 150w, https:\/\/wobable.com\/wp-content\/uploads\/2011\/10\/Wobable_tweet_ID-400x207.jpg 400w, https:\/\/wobable.com\/wp-content\/uploads\/2011\/10\/Wobable_tweet_ID.jpg 494w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Swap the number in the URL above, and then run it through your favourite QR encoder (my favourite is\u00a0<a href=\"http:\/\/zxing.appspot.com\/generator\/\" target=\"_blank\">zxing<\/a>, but bit.ly will give you a QR Code and analytics &#8211; see <a title=\"10 thoughts about QR codes\" href=\"https:\/\/wobable.com\/?p=125\">this post<\/a> for more details).<\/p>\n<p>I find this quite exciting, as there are all sorts of things we could do with this:<\/p>\n<ul>\n<li>Run a competition, where the best response to a tweet wins a prize.<\/li>\n<li>Collect user feedback, on and off line.<\/li>\n<\/ul>\n<div>The downsides are that the user still has to log in to Twitter (or already be logged in) to make the post. Also, most twitter users scanning the QR Code will be sent to the mobile twitter website (it detects when you surf from a phone), rather than using their mobile twitter app.<\/div>\n<p style=\"text-align: right;\"><em>Next page: What other intents are available?&#8230;<\/em><br \/>\n<!--nextpage--><\/p>\n<div><span class=\"Apple-style-span\" style=\"font-size: 26px; font-weight: bold;\">Other intents are available!<\/span><\/div>\n<p>In fact, there are quite a few.<\/p>\n<h2><strong>The simple ones are<\/strong><\/h2>\n<p><strong>Reply to a tweet<\/strong> (as outlined above):\u00a0<a href=\"http:\/\/www.twitter.com\/intent\/tweet?in_reply_to=128569788623634432\">http:\/\/www.twitter.com\/intent\/tweet?in_reply_to=128569788623634432<\/a><\/p>\n<p><strong>Retweet a tweet<\/strong>:\u00a0<a href=\"http:\/\/www.twitter.com\/intent\/retweet?tweet_id=128569788623634432\" target=\"_blank\">http:\/\/www.twitter.com\/intent\/retweet?tweet_id=128569788623634432<\/a><\/p>\n<p><strong>Favourite a tweet:<\/strong>\u00a0<a href=\"http:\/\/www.twitter.com\/intent\/favorite?tweet_id=128569788623634432\" target=\"_blank\">http:\/\/www.twitter.com\/intent\/favorite?tweet_id=128569788623634432<br \/>\n<\/a><\/p>\n<p><strong>View a mini twitter profile<\/strong>\u00a0of a user (the mini profile includes a follow button):\u00a0<a title=\"https:\/\/www.twitter.com\/intent\/user?screen_name=Wobable\" href=\"https:\/\/www.twitter.com\/intent\/user?screen_name=Wobable\" target=\"_blank\">https:\/\/www.twitter.com\/intent\/user?screen_name=Wobable<\/a><\/p>\n<p>&nbsp;<\/p>\n<h2>The more complicated intents:<\/h2>\n<p>You can actually encode an entire tweet, or partial tweet ready for the user to tweet (though they retain the ability to alter the tweet before sending).<\/p>\n<p><strong>Prepare a tweet that includes a hashtag (or two):<\/strong>\u00a0<a href=\"http:\/\/www.twitter.com\/intent\/tweet?hashtags=firsthashtag,secondhashtag\" target=\"_blank\">http:\/\/www.twitter.com\/intent\/tweet?hashtags=firsthashtag,secondhashtag<\/a>\u00a0&#8211; you can use as many hashtags as you want. Separate them with commas.<br \/>\nWhy not use this technique to add a QR Code on an event programme so everyone tweets using the same hashtag!<\/p>\n<p><strong>Prepare a tweet that mentions an individual:\u00a0<\/strong><a href=\"http:\/\/www.twitter.com\/intent\/tweet?via=wobable\" target=\"_blank\">http:\/\/www.twitter.com\/intent\/tweet?via=wobable<\/a><\/p>\n<p><strong>Prepare a tweet that includes a URL:\u00a0<\/strong><a href=\"https:\/\/twitter.com\/intent\/tweet?url=http%3A%2F%2Fwww.wobable.com%2FP%3D279\" target=\"_blank\">https:\/\/twitter.com\/intent\/tweet?url=http%3A%2F%2Fwww.wobable.com%2FP%3D279<\/a>\u00a0includes a link to this post. It looks complex until you understand that &#8220;http%3A%2F%2F&#8221; translates to &#8220;http:\/\/&#8221;. See the next section for more on encoding a tweet.<\/p>\n<p><strong>Prepare a tweet with some suggested text:<\/strong> <a href=\"http:\/\/www.twitter.com\/intent\/tweet?text=This+tweet+was+sent+by+using+a+twitter+intent\">http:\/\/www.twitter.com\/intent\/tweet?text=This+tweet+was+sent+by+using+a+twitter+intent<\/a><\/p>\n<p>Note that the spaces are converted into plus signs. Any symbol that you want to include (for instance @ or #) needs to either be encoded into ASCII code (@ is %40, # is %23), or dealt with in the intent using the techniques above.<\/p>\n<p>There is a very useful tool to encode ASCII here:\u00a0<a href=\"http:\/\/meyerweb.com\/eric\/tools\/dencoder\/\">http:\/\/meyerweb.com\/eric\/tools\/dencoder\/<\/a>. \u00a0This is what I used to convert the URL above.<\/p>\n<p>It is worth noting that the meyerweb tool converts spaces into %20 rather than +. This will still work in the web intent, but takes up three times the space (as %20 is three characters and + is only one) &#8211; so it is likely to make a QR Code more complex than it needs to be.<\/p>\n<p>If you want to include a carriage return, the symbol is %0A<\/p>\n<p><em>Note. This next section doesn&#8217;t always work &#8211; it seems to be to do with whether the website or browser understands UTF (extended character sets). Use at own risk!<\/em><\/p>\n<p>You can even include those annoying tweenage tweet symbols (assuming you know what the code is for them). For instance an open heart ?\u00a0is\u00a0%E2%99%A1<\/p>\n<p>A closed heart is\u00a0%E2%99%A5 &#8211; so &#8220;I\u00a0? New York&#8221; would be:\u00a0<a href=\"http:\/\/www.twitter.com\/intent\/tweet?text=I+?+New+York\">http:\/\/www.twitter.com\/intent\/tweet?text=I+%E2%99%A5+New+York<\/a><\/p>\n<p>There is a list of some of these pictograms\u00a0<a href=\"http:\/\/stuffofinterest.com\/misc\/utf8.php?s=9600\">here<\/a>\u00a0and <a href=\"http:\/\/stuffofinterest.com\/misc\/utf8.php?s=9728\">here<\/a>\u00a0&#8211; the relevant code is in the third column. I urge caution though, because not all twitter clients can read all these pictograms &#8211; and you cheeky message can look very silly when it is just a load of empty boxes!<\/p>\n<p><em>Note. End of picky section. If you copy and paste the above links, be careful that you don&#8217;t accidentally convert the percentage signs into ascii characters too (% is ascii\u00a0%25) as this can get VERY confusing!<\/em><\/p>\n<p><strong>You can even combine the techniques: <\/strong><a href=\"https:\/\/www.twitter.com\/intent\/tweet?text=I+am+very+excited+by+the+possibilities+of+mixing+Twitter+intents+and+QR+codes+&amp;&amp;hashtags=geek,QRCode&amp;url=http:\/\/www.wobable.com\/P=279&amp;via=wobable\" target=\"_blank\">https:\/\/www.twitter.com\/intent\/tweet?text=I+am+very+excited+by+the+possibilities+of+mixing+Twitter+intents+and+QR+codes&amp;hashtags=geek,QRCode&amp;url=http%3A%2F%2Fwww.wobable.com%2F%3FP%3D279&amp;via=wobable<\/a><\/p>\n<p>And of course we need to end with the QR Code for that (courtesy of Bit.ly, as the URL above is waaay too long):<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/bit.ly\/rqt3Lo.qrcode\" alt=\"\" width=\"245\" height=\"245\" \/><\/p>\n<p>Have fun with it! Let me know if you have any novel uses for this idea.<\/p>\n<p>Oh, and be sure to test it thoroughly before you use it &#8211; coding URLs I have found particularly tricky! <\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are some intriguing possibilities when you mix Twitter Web Intents with QR Codes. As no-one seems to have thought of this before, here I explain how it could work, and some suggested uses.<\/p>\n","protected":false},"author":1,"featured_media":283,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[98],"tags":[130,129,152,153],"class_list":["post-279","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-social-media","tag-intents","tag-qr-codes","tag-social-media","tag-twitter"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p2c0fT-4v","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/wobable.com\/wp-content\/uploads\/2011\/10\/WobableTweet1.png","_links":{"self":[{"href":"https:\/\/wobable.com\/index.php?rest_route=\/wp\/v2\/posts\/279","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wobable.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wobable.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wobable.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wobable.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=279"}],"version-history":[{"count":20,"href":"https:\/\/wobable.com\/index.php?rest_route=\/wp\/v2\/posts\/279\/revisions"}],"predecessor-version":[{"id":303,"href":"https:\/\/wobable.com\/index.php?rest_route=\/wp\/v2\/posts\/279\/revisions\/303"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wobable.com\/index.php?rest_route=\/wp\/v2\/media\/283"}],"wp:attachment":[{"href":"https:\/\/wobable.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wobable.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wobable.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}