Generating Facebook Open Graph meta tags dynamically
First, I want to reiterate that I am almost positive that your problem is due to the fact that the url you are passing into the debugger is not dynamically generated. The url tag essentially acts as a redirector. Unless it's the exact same (meaning the meta tags on the url meta object is the same as those on the url you are passing in) as the url you are testing, you won't get the results you're looking for.
The meta tag
<meta property="og:url">
needs to be dynamically generated. The debugger is being redirected to your default index page instead of the dynamically generated page.
For example, I assign an id to every object I'm using, and so I have something like the following
<meta property="og:url" content="http://example.com/index.php?id=<?php echo $_GET['id'] ?>"/>
I pass in that exact url into the debugger, and thus the final page the debugger lands on will be that exact url.
Also, in the following
<meta property="og:type" content=""/>
how is the property being dynamically generated? Did you remember to set in your actual code something like the following?
<meta property="og:type" content="<?php echo $_GET['type'] ?>"/>
You also appear to be shoving everything into the url, which is dangerous and can cause huge headaches, which might be the issue here. Instead, shove only one thing , eg ?type=bistro and then propagate the necessary data from the DB.
I would recommend dynamically generating most OG tags based on an object_id. Store the relevant OG info for every object_id, and then propagate them when accessed. This way, you can also easily expand and edit the tags you use when OG is updated.
If you have problems with OG you shouldn't hesitate to post them as new questions instead of comments as I guarantee other people also have the same problem.
I'm fairly certain Facebook no longer crawls any urls with parameters. It always "redirects" to a stripped version of the url.
In OPs example:
http://example.com/index.php?type=restaurant&title=luigis
becomes
http://example.com/index.php
regardless of what you do. Closest thing I've seen to an explanation is this:
A URL with no session id or extraneous parameters. All shares on Facebook will use this as the identifying URL for this article.
Yes, works like a charm, but needs some recoding for me. I have had to create a new page like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# MY_APP_NAME_SPACE: http://ogp.me/ns/fb/MY_APP_NAME_SPACE#">
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<!-- Open Graph meta tags -->
<meta property="og:title" content="<?= urldecode($_GET['title']) ?>" />
<meta property="og:type" content="article" />
<meta property="og:url" content="<?= "http://www.calsots.com".$_SERVER['REQUEST_URI']; ?>" />
<meta property="og:image" content="<?= $_GET['image'] ?>" />
<meta property="og:site_name" content="Calsots.com" />
<meta property="fb:admins" content="MY_APP_ID" />
<meta property="og:description" content="<?= urldecode($_GET['description']) ?>" />
</head>
</html>
When you click the Get Code link in your object types, did you try pasting the code it gave you?
I would try pasting to your web, and then if it works, replicate the html output.
Try it without the DOCTYPE tag.
Heres a sample of what I got, and I dont see these tags above: fb:app_id, not sure if it makes a difference.
Also, shouldnt the og:url also include the variables at the end?
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# website: http://ogp.me/ns/website#">
<meta property="fb:app_id" content="1234567888">
<meta property="og:url" content="http://mysite.com/index.php?type=MY_APP_NAMESPACE%3Abistro">