Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Object Debugger: property 'og:url' could not be parsed as type 'url'

Tags:

When I run my Facebook Open Graph object (http://www.21dads.com/testobject) through the Object Debugger, I'm getting the following errors:

Object Invalid Value: Object at URL 'http://www.21dads.com/testobject' of type 'thetestasdf:recipie' is invalid because the given value 'www.21dads.com/testobject' for property 'og:url' could not be parsed as type 'url'.

Missing Required Property: The og:url property is required, but not present.

Missing Required Property: The og:type property is required, but not present.

Missing Required Property: The og:title property is required, but not present.

Here is the HTML on the object page:

<html xmlns="http://www.w3.org/1999/xhtml">      <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# thetestasdf: http://ogp.me/ns/fb/thetestasdf#">       <meta property="fb:app_id"      content="325291980834949" />       <meta property="og:type"        content="thetestasdf:recipie" />       <meta property="og:url"         content="www.21dads.com/testobject" />       <meta property="og:title"       content="Cookie Recipie!" />       <meta property="og:description" content="Tastiest recipe ever" />       <meta property="og:image"       content="http://cdn.techpatio.com/wp-content/uploads/2009/11/cookie_law_eu.gif" />       <title> Cookie Recipie</title>     <head/>      <body>         <p> Test object page </p>     </body>  </html> 

The URL "www.21dads.com/testobject" is my controller which then generates the HTML from a view file. Why can't this URL be parsed?

Why am I getting the other "missing required property" errors when they are already included?

Thanks.

like image 531
JMan Avatar asked Jan 27 '12 18:01

JMan


2 Answers

You should have scheme in front of og:url content (like http:// or https:// ), or this isn't URL.

In your specific case you should replace www.21dads.com/testobject with http://www.21dads.com/testobject

like image 171
Juicy Scripter Avatar answered Oct 04 '22 11:10

Juicy Scripter


Roundup / checklist of possible issues to check for:

  • Make sure your meta tag matches http:// or https:// in the URL.
  • Make sure your meta tag matches www or non-www in the URL.
  • (Sidenote: You should pick one combo of http/https www/non-www and redirect all of your traffic to that URL anyways, and make sure that matches your og:url meta tag)
  • Check for whitespace before or after the URL
  • Check for a trailing slash forced by Facebook that may not be in your meta tag
  • Check for duplicated "og:url" meta tags
  • Check that your URL is publicly available (you can't use the online debugger successfully for a localhost install - check it once you're on a staging or production site that's publicly available). Double check that you're not on a password-protected or IP address restricted environment.
  • Check your spelling - is the URL really correct?
  • Scrape the URL again. If you fixed it, you need to re-scrape, not just try again.
like image 44
squarecandy Avatar answered Oct 04 '22 10:10

squarecandy