{"id":113,"date":"2010-01-04T07:24:35","date_gmt":"2010-01-04T13:24:35","guid":{"rendered":"http:\/\/www.weblearning.co.za\/blog\/?p=113"},"modified":"2010-01-04T07:24:35","modified_gmt":"2010-01-04T13:24:35","slug":"testing","status":"publish","type":"post","link":"https:\/\/weblearning.co.za\/blog\/testing\/","title":{"rendered":"Testing times for an oEmbed ignoramus"},"content":{"rendered":"<p><a href=\"http:\/\/www.dkeats.com\/index.php?module=blog&amp;action=viewsingle&amp;postid=gen13Srv30Nme10_92208_1262608079&amp;userid=1563080430\">Derek Keats<\/a> is testing Chisimba, <a href=\"http:\/\/twitter.com\/paulscott56\/statuses\/7361179371\">oEmbed and WordPress<\/a> and I&#8217;ve offered to get my hands dirty and assist. I&#8217;m officially an oEmbed ignoramus (remember, I&#8217;m an ex-history teacher). But I&#8217;m also a networked learner. Search engines have allowed me to almost instantly explore an array of unknown fields, modular Word Press Plugins make me feel technologically sussed and my Twitter friends have enlightened and directed my thoughts.  I&#8217;ve benefited from Derek&#8217;s <a href=\"http:\/\/twitter.com\/dkeats\">Twitter<\/a> comments and so I volunteered to test his code.<\/p>\n<p>I turned to <a href=\"http:\/\/heapr.com\">Heapr<\/a> for assistance. A brief scan through their results left me with an  introductory article by oembed and a WebMonkey tutorial.<\/p>\n<blockquote><p><em>&#8220;oEmbed is a format for allowing an embedded representation of a URL on third party sites. The simple API allows a website to display embedded content (such as photos or videos) when a user posts a link to that resource, without having to parse the resource directly.<\/em>&#8221; (<a href=\"http:\/\/oembed.com\/\">oEmbed.com<\/a> )<\/p><\/blockquote>\n<p>I don&#8217;t know about you, but definitions don&#8217;t always work for me. I prefer to explore first and then concisely articulate. I&#8217;d rather see what is being defined, reverse engineer it and then attempt describe it in words. I&#8217;m a data plumber with a &#8220;Justdoit&#8221; approach to understanding. I&#8217;d far rather apply first then analyse and understand.<\/p>\n<p>Webmonkey&#8217;s tutorial prompted some &#8220;dirty learning&#8221;. I copied and pasted their <a href=\"http:\/\/www.webmonkey.com\/print\/tutorial\/Get_Started_With_OEmbed\">oEmbed<\/a> exemplar. Below is a line of code from their site.<\/p>\n<p><a href=\"http:\/\/www.flickr.com\/services\/oembed\/?url=http%3A\/\/www.flickr.com\/photos\/bees\/2341623661\/\">http:\/\/www.flickr.com\/services\/oembed\/?url=http%3A\/\/www.flickr.com\/photos\/bees\/2341623661\/<\/a><\/p>\n<p>Click, test, yes &#8211; it works. First success. Getting my hands dirty is always satisfying.<br \/>\nEncouraged &#8211; I now tuned to Keats&#8217; Code.<\/p>\n<p>Below are my two attempts<br \/>\n<strong>Encoded<\/strong><br \/>\n<a href=\"http:\/\/www.dkeats.com\/index.php?module=oembed&amp;action=provideimage&amp;as=json&amp;image=http%3A%2F%2Fwww.dkeats.com%2Fusrfiles%2Fusers%2F1563080430%2Ftestimages%2FIMG_2919.resized.JPG\">http:\/\/www.dkeats.com\/index.php?module=oembed&amp;action=provideimage&amp;as=json\u2111=http%3A%2F%2Fwww.dkeats.com%2Fusrfiles%2Fusers%2F1563080430%2Ftestimages%2FIMG_2919.resized.JPG<\/a><br \/>\n<strong>Not Encoded<\/strong><br \/>\n<a href=\"http:\/\/www.dkeats.com\/index.php?module=oembed&amp;action=provideimage&amp;=http:\/\/www.dkeats.com\/usrfiles\/users\/1563080430\/testimages\/IMG_2832.resized.JPG\">http:\/\/www.dkeats.com\/index.php?module=oembed&amp;action=provideimage&amp;=http:\/\/www.dkeats.com\/usrfiles\/users\/1563080430\/testimages\/IMG_2832.resized.JPG<\/a><\/p>\n<p>Click, Test &#8211; Oops &#8211; The first one links to a php file and the second gives a 404 error &#8211; what am I doing wrong? Could be my version of WordPress? No &#8211; the Flickr example worked. Or my coding? Quite possible. My hands are filthy and I&#8217;ve got a few mud splatters on my face. Or maybe Keats code has errors.<\/p>\n<p>Back to the instructions. I missed the first line &#8211; &#8220;Please note that you can only do this test if you have the WordPress oEmbed plugin installed.&#8221; &#8211; in red. Off to <a href=\"http:\/\/janwillemeshuis.nl\/wordpress-plugins\/oembedder-plugin\/\">oembedder plugin<\/a> install and enable it.<\/p>\n<p>Lets try again.<\/p>\n<p><a href=\"http:\/\/www.weblearning.co.za\/blog\/blog\/wp-content\/uploads\/2010\/01\/code-removed-1.PNG\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-172\" title=\"code removed 1\" src=\"http:\/\/www.weblearning.co.za\/blog\/blog\/wp-content\/uploads\/2010\/01\/code-removed-1.PNG\" alt=\"code removed 1\" width=\"690\" height=\"69\" \/><\/a><\/p>\n<p>And now preview the post  &#8211; but I get an <a href=\"http:\/\/www.weblearning.co.za\/blog\/blog\/wp-content\/uploads\/2010\/01\/server-error.PNG\">500 server error<\/a> message. Has the server has crashed? No, I can edit the post. Disable the oembedder plugin and I can see the post.<\/p>\n<p>Lets try some code from the oembedder plugin readme file<\/p>\n<p>[oembed:http:\/\/www.flickr.com\/services\/oembed\/?url=http:\/\/www.flickr.com\/photos\/23886028@N04\/3983995799\/in\/set-72157622398187791\/]<\/p>\n<p>Hey it works<\/p>\n<p>Whoah, this is getting way beyond me. Time for the PLN to assist?  Could you help me out? Does the problem lie with my server, my slightly out of date WordPress code, the oEmbed code Derek put together or my HTML? Any assistance &#8211; as always &#8211; is most gratefully received.<\/p>\n<p><strong>Update 5 Jan 2009<br \/>\n<\/strong>Derek has provided me with a couple of updates in the comments<\/p>\n<p>Let&#8217;s try the code with the amended <em>provideimage<\/em> and <em>format=xml<\/em><\/p>\n<p><a href=\"http:\/\/www.weblearning.co.za\/blog\/blog\/wp-content\/uploads\/2010\/01\/code-removed.PNG\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-171\" title=\"code removed\" src=\"http:\/\/www.weblearning.co.za\/blog\/blog\/wp-content\/uploads\/2010\/01\/code-removed.PNG\" alt=\"code removed\" width=\"687\" height=\"85\" \/><\/a><\/p>\n<p>Nope &#8211; problem still repeats itself. Following this up with my service providers, but it looks like oEmbed code from Chisimba is not working here on my machine. I&#8217;d be interested to hear if anyone else can get Chisimba and their oEmbed to work on their site.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Derek Keats is testing Chisimba, oEmbed and WordPress and I&#8217;ve offered to get my hands dirty and assist. I&#8217;m officially an oEmbed ignoramus (remember, I&#8217;m an ex-history teacher). But I&#8217;m also a networked learner. Search engines have allowed me to almost instantly explore an array of unknown fields, modular Word Press Plugins make me feel &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/weblearning.co.za\/blog\/testing\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Testing times for an oEmbed ignoramus&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"episode_type":"","audio_file":"","cover_image":"","cover_image_id":"","duration":"","filesize":"","filesize_raw":"","date_recorded":"","explicit":"","block":"","itunes_episode_number":"","itunes_title":"","itunes_season_number":"","itunes_episode_type":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_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":[6],"tags":[42],"class_list":["post-113","post","type-post","status-publish","format-standard","hentry","category-development","tag-oembed","entry"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/weblearning.co.za\/blog\/wp-json\/wp\/v2\/posts\/113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/weblearning.co.za\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/weblearning.co.za\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/weblearning.co.za\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/weblearning.co.za\/blog\/wp-json\/wp\/v2\/comments?post=113"}],"version-history":[{"count":0,"href":"https:\/\/weblearning.co.za\/blog\/wp-json\/wp\/v2\/posts\/113\/revisions"}],"wp:attachment":[{"href":"https:\/\/weblearning.co.za\/blog\/wp-json\/wp\/v2\/media?parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/weblearning.co.za\/blog\/wp-json\/wp\/v2\/categories?post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/weblearning.co.za\/blog\/wp-json\/wp\/v2\/tags?post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}