2012-02-14 9 views
0

나는 facebook 같은 버튼이있는 페이지가 있으며, 해당 doc 유형과 네임 스페이스는 다음과 같습니다.Facebook 메타 태그 - 유추 된 속성 경고

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" id="facebook" xmlns:fb="http://ogp.me/ns/fb#" xmlns:og="http://ogp.me/ns#"> 

내가 페이지 소스 메타 태그를 볼 (이것들은 W3 파서를 건너 주석되었다.)

 <!-- <meta property="og:title" content="Mysitename" /> 
    <meta property="og:locale" content="en_US" /> 
    <meta property="og:type" content="abc" /> 
    <meta property="og:url" content="http://testing.site.com/abc/123/show" /> 
    <meta property="og:image" content="http://testing.site.com/images/logo.jpg" /> 
    <meta property="og:site_name" content="www.Myoriginalsite.com" /> 
    <meta property="fb:app_id" content="10101010" /> --> 

이 때문에, URL 및 이미지를 촬영 한 프로젝트 레일에 루비입니다 다음과 같습니다 ERB 사용 (참고 - 그래서이 페이지의 헤더가 다른 페이지에서 오는 난간을 통해 신체와 결합)

<meta property="og:url" content="<%= "http://" + request.env["HTTP_HOST"] + request.request_uri%>" /> 
    <meta property="og:image" content="<%= "http://" + request.env["HTTP_HOST"]%>/images/logo.jpg" /> 

가 10,101,010을 fb_app_id 관련, 웹 사이트 URL은으로 정의된다3210 페이 스북 응용 프로그램에서.

developers.facebook.com/tools/debug/를 사용하여 url testing.site.com/abc/123/show를 디버깅 할 때 유추 한 속성 오류와 같은 버튼 경고 및 열린 그래프 경고를 제공합니다. 그리고 표준 URL은 esting.site.com/abc/123/show

단추와 같은 HTML입니다.

<div style="margin-top: 5px" class="fb-like" data-href="<%= "http://" + request.env["HTTP_HOST"] + request.request_uri %>" data-send="false" data-width="250" data-show-faces="false" data-colorscheme="dark" data-font="verdana"></div> 

는하지만 버튼처럼 클릭하면 내 메타 태그 속성을 표시합니다. 좋아요 버튼이 제대로 작동하고 있습니다. 그러나 그것은 임의의 값을 메타 태그로 사용합니다. 어떤 사람도 제발 도와 줄 수 있니?

답변

0

메타 태그가 제공된 코드에서 주석 처리되었으므로 Facebook Linter가 (가) 크롤링하기 전에 OpenGraph 메타 태그를 감싸는 HTML 주석 (<!---->)을 제거해야합니다.