{"id":460,"date":"2017-06-19T12:11:17","date_gmt":"2017-06-19T09:11:17","guid":{"rendered":"http:\/\/tuijasonkkila.fi\/?p=460"},"modified":"2024-09-20T13:21:35","modified_gmt":"2024-09-20T10:21:35","slug":"consuming-ifttted-twitter-favs","status":"publish","type":"post","link":"https:\/\/tuijasonkkila.fi\/?p=460","title":{"rendered":"Consuming IFTTTed Twitter favs"},"content":{"rendered":"<p>\u202aI consider my Twitter favourites to be mainly bookmarks although endorsements happen too. <em>Liking<\/em> comes from Instagram and Facebook but because my social media communities do not really overlap, I sometimes want to send digital respect in Twitter too. I&#8217;ve tried to unlearn the classic liking in Twitter and instead reply or retweet, but old habits &#8211; you know.\u202c<\/p>\n<p>\u202aThere&#8217;s little point in bookmarking if you cannot find your bookmarks afterwards. The official Twitter archive that I unzip to <a href=\"https:\/\/tuijasonkkila.fi\" target=\"_blank\" rel=\"noopener\">my private website<\/a> few times a year, does not include favourites, which is a pity. The archive looks nice out of the box, and there is a search facility. \u202c<\/p>\n<p>\u202aSince late 2013, I have an active IFTTT rule that writes metadata of the favourited tweet to a Google spreadsheet. <a href=\"https:\/\/ifttt.com\" target=\"_blank\" rel=\"noopener\">IFTTT<\/a> is a nifty concept but oftentimes there are delays and other hickups. \u202c<\/p>\n<p>\u202aMy husband and I lunch together several times a week. Instead of emailing, phoning or IM&#8217;ing the usual <em>5 minutes and I&#8217;m there bye<\/em> message, I had this idea of enhanced automation with IFTTT. Whenever I entered the inner circle around our regular meeting point, IFTTT sent me an email announcing <em>Entered the area.<\/em> This caused a predefined email rule to trigger which forwarded the message to the receiver. Basta! At first this simple digital helper was fun, but as soon as it didn&#8217;t deliver, trust started to erode rapidly.<\/p>\n<p>&#8211; Where are you? Didn&#8217;t you get the message?<br \/>\n&#8211; What message?<\/p>\n<p>Sometimes the email came doubled, sometimes it arrived the next day (or never). After few months I had to deactivate the rule.\u202c<\/p>\n<p>\u202aWith tweets it&#8217;s not so critical. In the beginning I checked few times that the spreadsheet do was populated, but then I let it be. From time to time Google (or IFTTT) opens up a new document but fortunately keeps the original file name, just adds a version number.\u202c<\/p>\n<figure id=\"attachment_461\" aria-describedby=\"caption-attachment-461\" style=\"width: 168px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/tuijasonkkila.fi\/wp-content\/uploads\/2017\/06\/image1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/tuijasonkkila.fi\/wp-content\/uploads\/2017\/06\/image1-168x300.png\" alt=\"IFTTT rule\" class=\"size-medium wp-image-461\" width=\"168\" height=\"300\" srcset=\"https:\/\/tuijasonkkila.fi\/wp-content\/uploads\/2017\/06\/image1-168x300.png 168w, https:\/\/tuijasonkkila.fi\/wp-content\/uploads\/2017\/06\/image1-575x1024.png 575w, https:\/\/tuijasonkkila.fi\/wp-content\/uploads\/2017\/06\/image1-624x1109.png 624w, https:\/\/tuijasonkkila.fi\/wp-content\/uploads\/2017\/06\/image1.png 750w\" sizes=\"auto, (max-width: 168px) 100vw, 168px\" \/><\/a><figcaption id=\"caption-attachment-461\" class=\"wp-caption-text\">IFTTT rule<\/figcaption><\/figure>\n<p>\u202aI appreciate Google&#8217;s back office services but don&#8217;t often use their user interfaces. Besides, my IFTTT&#8217;ed archive does not include the tweet status text, so without some preprocessing the archive is useless anyhow. In theory I could get the text by building calls myself to the Twitter API with the Google Query Language, or become a member of the seemingly happy TAGS community. <a href=\"https:\/\/tags.hawksey.info\/\" target=\"_blank\" rel=\"noopener\">TAGS<\/a> is a long-lasting and sensible tool by Martin Hawksey. But what would blogging be without the NIH spirit, so here we go.\u202c<\/p>\n<p>\u202aBecause I have access to a <a href=\"http:\/\/www.shinyapps.io\" target=\"_blank\" rel=\"noopener\">shinyapps.io<\/a> instance, I made a searchable tweet interface as an R Shiny web app. For that I needed to\u202c<\/p>\n<ul>\n<li>Install <a href=\"https:\/\/github.com\/jennybc\/googlesheets\" target=\"_blank\" rel=\"noopener\">googlesheets<\/a> and <a href=\"https:\/\/cran.r-project.org\/web\/packages\/twitteR\/\" target=\"_blank\" rel=\"noopener\">twitterR<\/a>\u202c<\/li>\n<li>Collect information on my tweet sheets\u202c, and download all data\u202c in them<\/li>\n<li>Expand short URLs\u202c<\/li>\n<li>Fetch the Twitter status from the API\u202c<\/li>\n<li>Write a row to the latest sheet to denote where to start next time\u202c<\/li>\n<li>Build the Shiny app\u202c<\/li>\n<\/ul>\n<p>The app acts now as a searchable table to my favourite tweets. While at it, I also plotted statistics on timeline.<\/p>\n<p><a href=\"https:\/\/ttso.shinyapps.io\/twfavs\/\" target=\"_blank\" rel=\"noopener\">Here is the app<\/a>. The <a href=\"https:\/\/github.com\/tts\/twfavs\/blob\/master\/gettweets.R\" target=\"_blank\" rel=\"noopener\">R code for gathering all data<\/a> is in GitHub, likewise the <a href=\"https:\/\/github.com\/tts\/twfavs\/blob\/master\/app.R\" target=\"_blank\" rel=\"noopener\">code how I built the app<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u202aI consider my Twitter favourites to be mainly bookmarks although endorsements happen too. Liking comes from Instagram and Facebook but because my social media communities do not really overlap, I sometimes want to send digital respect in Twitter too. I&#8217;ve tried to unlearn the classic liking in Twitter and instead reply or retweet, but old &hellip; <a href=\"https:\/\/tuijasonkkila.fi\/?p=460\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Consuming IFTTTed Twitter favs<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[149],"tags":[112,111,13,7,28],"class_list":["post-460","post","type-post","status-publish","format-standard","hentry","category-diverse-coding","tag-google-drive","tag-ifttt","tag-r","tag-shiny","tag-twitter"],"_links":{"self":[{"href":"https:\/\/tuijasonkkila.fi\/index.php?rest_route=\/wp\/v2\/posts\/460","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tuijasonkkila.fi\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tuijasonkkila.fi\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tuijasonkkila.fi\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tuijasonkkila.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=460"}],"version-history":[{"count":6,"href":"https:\/\/tuijasonkkila.fi\/index.php?rest_route=\/wp\/v2\/posts\/460\/revisions"}],"predecessor-version":[{"id":1020,"href":"https:\/\/tuijasonkkila.fi\/index.php?rest_route=\/wp\/v2\/posts\/460\/revisions\/1020"}],"wp:attachment":[{"href":"https:\/\/tuijasonkkila.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tuijasonkkila.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tuijasonkkila.fi\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}