2011-04-22 4 views
2

비슷한 버튼을 구현하고 있지만 어떤 이유로 메타 태그의 정보가 제대로 전송되지 않습니다.Facebook 버튼처럼 URL이 정확하지만 메타 정보가 아님

URL을 <fb:like></fb:like> 태그에 넣으면 올바른 URL이 FB의 벽 포스트에로드됩니다. 그러나 이미지와 메타 태그에 설명 된 다른 모든 항목은 함께 게시되지 않습니다. <fb:like></fb:like> 태그 중에서 href을 남겨두면 같은 버튼이 켜져있는 페이지로 연결됩니다. 불행히도 링크에 매개 변수를 추가해야하므로 FB 포스트에서 사용자가 사이트를 클릭하면 올바르게 표시됩니다.

링크를 통해 링크를 실행했지만 링터에 나타나는 메타 태그의 이미지 나 설명이 아닌 동일한 이미지와 기본 사이트 정보를 벽 게시물에 계속 표시합니다.

기본적으로 내 메타 정보가 무시되고있는 것처럼 보입니다. 내가 도대체 ​​뭘 잘못하고있는 겁니까? 캐시 문제입니까?

<?xml version="1.0"?> 
<!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" 
    xmlns:og="http://ogp.me/ns#" 
    xmlns:fb="http://www.facebook.com/2008/fbml"> 
<head> 
<meta property="og:title" content="Product Title" /> 
<meta property="og:type" content="product" /> 
<meta property="og:url" content="http://www.mysite.com/folder/folder/gateway.cfm?ifcn=1&amp;fbx=true&amp;type=product&amp;product=771&amp;page=gateway" /> 
<meta property="og:image" content="http://www.mysite.com/folder/folder/images/theImage.jpg" /> 
<meta property="og:site_name" content="My Site" /> 
<meta property="fb:admins" content="ADMIN_ID123" /> 
:

편집 ...

문서의 머리를 그냥 IE에서이 테스트 나는 등의 버튼이 그 페이지를 찾을 수 없습니다라고해야 오류가

</head> 
<body> 
<div id="fb-root"></div> 
<script> 
window.fbAsyncInit = function() { 
FB.init({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> 

내처럼 버튼 :

그냥 body 태그 내부

<fb:like href="http://www.mysite.com/folder/folder/product.cfm?pid=562&ifcn=1&fbx=true&type=product&product=562&page=gateway " show_faces="false" width="450" font=""></fb:like> 
+0

html의 'fb-root'요소는 어디에 있습니까? – emaillenin

+0

@emaillenin, 내 페이지의 위치를 ​​표시하도록 코드를 업데이트했습니다. 여는'body' 태그 바로 뒤에 있습니다. – Ofeargall

+0

opengraph 메타 태그를 사용하려면이 doctype이 필요하다고 생각합니다. 또한 시도해보십시오. 다음과 같이 xmlns : og를 수정하십시오. xmlns : og = "http://opengraphprotocol.org/schema/" – emaillenin

답변

0

페이 스북 (Facebook) 버튼처럼 쿼리 문자열을 좋아하지 않으므로 인코딩해야하고 일부 브라우저에서는 작동하지 않습니다.

Facebook Linter을 통해 원하는 링크를 실행 해보십시오. 유용한 정보와 오류를 줄 수 있습니다.

관련 문제