开发者

facebook like problem with Open graph

开发者 https://www.devze.com 2023-04-03 04:18 出处:网络
I am attempting to integrate Facebook open graph into my site but I ran it through the URL Linter and I get the error: \"Required Property Missing, og:titleand og:urlis required\".This is a descriptio

I am attempting to integrate Facebook open graph into my site but I ran it through the URL Linter and I get the error: "Required Property Missing, og:titleand og:url is required". This is a description page for my product.

Am I missing something?

<html xmlns="http://开发者_StackOverflow社区www.w3.org/1999/xhtml"  xml:lang="en" xmlns:fb="http://www.facebook.com/2008/fbml"  xmlns:og="http://ogp.me/ns#" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Description" content="" />
<meta name="keywords" content="hard drives, electronics, cctv, cables, psu" />
<meta name="document-classification" content="" />

<meta property="og:title" content="CAT5e UTP PATCH ETHERNET NETWORK CABLE LEAD 0.5M GREEN" />
<meta property="og:type" content="product"/>
<meta property="og:url" content="http://apps.facebook.com/maplinuk/buynow-id-10015,20015-cat5e-utp-patch-ethernet-network-cable-lead-0-5m-green.html" />
<meta property="og:image" content="http://www.247topseller.co.uk/clientstores/maplinuk/prod_image/rj45_250300.jpg" />
<meta property="og:site_name" content="maplinuk" />
<meta property="fb:app_id" content="{clipped}"/>
<meta property="og:description" content="CAT5e UTP PATCH ETHERNET NETWORK CABLE LEAD 0.5M GREEN" />

</head>
<body>
<div id="fb-root"></div>
<script type="text/javascript">

window.fbAsyncInit = function() {
FB.init({appId: '{clipped}', status: true, cookie: true, xfbml: true});

  };
(function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
}());
</script>
<fb:like href="http://apps.facebook.com/maplinuk/buynow-id-10015,20015-cat5e-utp-patch-ethernet-network-cable-lead-0-5m-green.html" show_faces="true" width="450" font="">    </fb:like>
</body>
</html>


I believe the problem arises because your og:url points to an app page (yours, I assume).

The Facebook code for the Like button will, as far as I know, go to that URL and attempt to retrieve the metadata from there - not from the original page that you posted here.

So the error message is telling you that your app page within Facebook doesn't have these metadata elements.

I have explained in more detail the use of og:url.

David

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号