{"id":4513,"date":"2017-01-18T20:39:37","date_gmt":"2017-01-18T20:39:37","guid":{"rendered":"http:\/\/johnjohnston.info\/blog\/?p=4513"},"modified":"2017-01-18T20:47:30","modified_gmt":"2017-01-18T20:47:30","slug":"wordpress-twitter-card-idea","status":"publish","type":"post","link":"https:\/\/johnjohnston.info\/blog\/wordpress-twitter-card-idea\/","title":{"rendered":"WordPress twitter card idea"},"content":{"rendered":"<p><em>A little blue sky thinking, or borrowing some ideas from @davewiner &amp; @mrkrndvs<\/em><\/p>\n<p><em>I wonder if a WordPress plugin could ape pngWriter and create images for twitter cards with the text from the excerpt on the image used by twitter.<\/em><br \/>\n<em> Like this, but with less fireworks.<\/em><\/p>\n<p>I&#8217;ve been thinking about twitter again.<\/p>\n<p>I think I&#8217;d have preferred twitter to be just text rather than being expanded to include all the media and &#8216;twitter cards&#8217;. I&#8217;d rather the reading flow would be twitter for short stuff and link to more visual or longer material out on your blog. That would perhaps make reading a little deeper and avoid the problem of folk just seeing the main point of an article and reacting to that <a id=\"fnr1-2017-01-18\" href=\"#fn1-2017-01-18\"><sup>1<\/sup><\/a>.<\/p>\n<p>But that cat left the bag a while ago. Now when I look at my twitter stream it is full of images. I occasionally use <a href=\"http:\/\/oneshot.link\/\">OneShot<\/a> to grab and crop out interesting bits of text to share and surmount the 140 char limitation too.<\/p>\n<p>I am not sure if this is a great idea<\/p>\n<blockquote class=\"twitter-tweet\" data-width=\"500\" data-dnt=\"true\">\n<p lang=\"en\" dir=\"ltr\">this buffoon (blush) wonders if blog post with text as a featured image( twitter:image meta ) and in body would be better?<\/p>\n<p>&mdash; john johnston (@johnjohnston) <a href=\"https:\/\/twitter.com\/johnjohnston\/status\/802826745950961664?ref_src=twsrc%5Etfw\">November 27, 2016<\/a><\/p><\/blockquote>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>Recently I&#8217;ve watched <a title=\"Scripting News\" href=\"http:\/\/scripting.com\">Dave Winer<\/a> experimenting with <a href=\"http:\/\/pngwriter.com\/\">pngWriter<\/a> (see the about page: <a href=\"http:\/\/pngwriter.com\/about\/\">About pngWriter<\/a>). This creates images of blocks of text and sends them out in a tweet. It also creates an RSS feed of the text (pngWriter is not open for use at the moment).<\/p>\n<p>This reminded me of how Aaron uses featured images in his blog: <a href=\"http:\/\/readwriterespond.com\/?p=873\">Creative Commons Starts with Making &#8211; A Reflection on Creating and Sharing &#8211; Read Write Respond<\/a><\/p>\n<p>So I am kicking round a couple of ideas.<\/p>\n<ol>\n<li>If you used pngWriter you could pull the rss into your blog. You could do it in WordPress with the FeedWordPress plugin.<\/li>\n<li>A plugin could be made that would do the same sort of thing in WordPress, take the except text from a post and make an image for twitter from that.<\/li>\n<\/ol>\n<p>Here is how I imagine that working<\/p>\n<ol>\n<li>Using an html5 canvas to automatically create an image of the post&#8217;s excerpt.<\/li>\n<li>Auto upload that to WordPress media library.<\/li>\n<li>Make it the featured image of the post<\/li>\n<\/ol>\n<p style=\"padding-left: 30px;\">Alternatively (better?) make it the content of the twitter:image metatag for the post, that means that the featured image on the post would not have the text, visitors could read the post.<\/p>\n<p style=\"padding-left: 30px;\">Or make a copy of the posts featured image, add the text and make that the twitter card image (I can imagine that might be different to get the text readable.).<\/p>\n<p>For a couple of minutes I imagined that my babysteps php &amp; JavaScript could put something like this together. Then reality kicked in. So I though I&#8217;d post it out here maybe someone else would think it would be a good idea.<\/p>\n<div class=\"footnotes\">\n<p>1. <a id=\"fn1-2017-01-18\"><\/a>See <a href=\"https:\/\/hapgood.us\/2016\/11\/10\/facebook-broke-democracy-but-the-fix-is-harder-than-people-realize\/\">Facebook Broke Democracy, but the Fix Is Harder Than People Realize. | Hapgood<\/a> <a href=\"#fnr1-2017-01-18\">\u21a9<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>A little blue sky thinking, or borrowing some ideas from @davewiner &amp; @mrkrndvs I wonder if a WordPress plugin could ape pngWriter and create images for twitter cards with the text from the excerpt on the image used by twitter. Like this, but with less fireworks. I&#8217;ve been thinking about twitter again. I think I&#8217;d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4523,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"mf2_syndication":[],"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"webmentions_disabled_pings":false,"webmentions_disabled":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6],"tags":[648,543,26,11],"post_format":[],"class_list":{"0":"post-4513","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-wwwd","8":"tag-aaron-davis","9":"tag-dave-winer","10":"tag-twitter","11":"tag-wordpress","12":"kind-article","14":"h-entry","15":"hentry"},"better_featured_image":{"id":4523,"alt_text":"","caption":"","description":"","media_type":"image","media_details":{"width":800,"height":400,"file":"2017\/01\/twitter-cd-feature.jpg","sizes":{"thumbnail":{"file":"twitter-cd-feature-150x150.jpg","width":150,"height":150,"mime-type":"image\/jpeg","source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2017\/01\/twitter-cd-feature-150x150.jpg"},"medium":{"file":"twitter-cd-feature-620x310.jpg","width":620,"height":310,"mime-type":"image\/jpeg","source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2017\/01\/twitter-cd-feature-620x310.jpg"},"medium_large":{"file":"twitter-cd-feature-768x384.jpg","width":768,"height":384,"mime-type":"image\/jpeg","source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2017\/01\/twitter-cd-feature-768x384.jpg"},"post-thumbnail":{"file":"twitter-cd-feature-668x334.jpg","width":668,"height":334,"mime-type":"image\/jpeg","source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2017\/01\/twitter-cd-feature-668x334.jpg"},"sempress-image-post":{"file":"twitter-cd-feature-668x334.jpg","width":668,"height":334,"mime-type":"image\/jpeg","source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2017\/01\/twitter-cd-feature-668x334.jpg"},"rpwe-thumbnail":{"file":"twitter-cd-feature-45x45.jpg","width":45,"height":45,"mime-type":"image\/jpeg","source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2017\/01\/twitter-cd-feature-45x45.jpg"},"jetpack-portfolio-admin-thumb":{"file":"twitter-cd-feature-50x50.jpg","width":50,"height":50,"mime-type":"image\/jpeg","source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2017\/01\/twitter-cd-feature-50x50.jpg"}},"image_meta":{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0","keywords":[]}},"post":4513,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2017\/01\/twitter-cd-feature.jpg"},"jetpack_featured_media_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2017\/01\/twitter-cd-feature.jpg","jetpack_shortlink":"https:\/\/wp.me\/p57zFQ-1aN","jetpack_likes_enabled":false,"jetpack_sharing_enabled":true,"kind":false,"_links":{"self":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/4513","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/comments?post=4513"}],"version-history":[{"count":8,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/4513\/revisions"}],"predecessor-version":[{"id":4522,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/4513\/revisions\/4522"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/media\/4523"}],"wp:attachment":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/media?parent=4513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/categories?post=4513"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/tags?post=4513"},{"taxonomy":"post_format","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/post_format?post=4513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}