2011-12-12 3 views
1

은 내가 여분의 재산권 오류를 많이했기 때문에 https://developers.facebook.com/tools/debug페이스 북 오픈 그래프 및 메타 태그

에서 다음과 같은 출력 내가는 locale 메타 태그를 추가했습니다. 그러나 그것은 그것을 해결하지 못합니다.

Extraneous Property: Objects of this type do not allow properties named og:latitude 
Extraneous Property: Objects of this type do not allow properties named og:longitude. 
Extraneous Property: Objects of this type do not allow properties named og:region. 
Extraneous Property: Objects of this type do not allow properties named og:street-address. 
Extraneous Property: Objects of this type do not allow properties named og:locality. 
Extraneous Property: Objects of this type do not allow properties named og:postal-code. 
Extraneous Property: Objects of this type do not allow properties named og:country-name. 
Extraneous Property: Objects of this type do not allow properties named og:email. 
Extraneous Property: Objects of this type do not allow properties named og:phone_number. 
Extraneous Property: Objects of this type do not allow properties named og:fax_number. 

나는 또한 <html> 태그의 네임 스페이스를 가지고 : https://developers.facebook.com/docs/opengraph/

내 문서 타입은 내가 체크 한 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">

입니다 : 내가 여기 제안 xmlns:fb="https://www.facebook.com/2008/fbml" 을 시도

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

이 스레드 Facebook Open Graph locale for Australia 및이 Object Debugger gives me Extraneous Property And Inferred Property error on opg

하지만 여전히 여분의 재산권 오류를 가지고

편집 : 오픈 그래프의 네임 스페이스 정의를 탐색 할 때 https://developers.facebook.com/docs/opengraph/#extra-data, 내가 위도와 경도 값 옵션이 표시되지 않는 :이 문서를 사용 , 페이스 북의 문서는 그것을 추천한다. 하지만 Facebook의 디버거는이를 받아들이지 않습니다. 나는 ... 여기 뭔가

Edit2가 누락 오전 : 내가 가진 :

<meta property="og:type" content="company" /> 

를하지만, 페이스 북은 말한다 : https://graph.facebook.com/10150616664862786

유형 : 웹 사이트 ???

왜 Facebook이 다른 유형을 볼 수 있습니까? 어떻게 해결할 수 있습니까?

+0

사이트에 대한 링크를 제공해 주실 수 있습니까? – Abby

답변

1

og : type = company를 지정 했더라도 Linter는 귀하의 유형이 웹 사이트임을 보여 주며, 사용하려는 속성이 웹 사이트 개체 유형에는 적용되지 않기 때문입니다. 이에 대한 대답은 here입니다. 귀하의 진짜 문제는 린터가 잘못 읽고 og : 유형입니다.

+0

그러나 회사는 유효한 유형입니다. https://developers.facebook.com/docs/opengraph/#types –

+0

예. 그러나 분명히 당신을 위해 일하고 있지 않습니다. 해당 오류 메시지가있는 이유는 type = website가 이러한 속성을 가질 수 없기 때문입니다. 이제 회사를 입력하는 대신 유형 웹 사이트를 보는 이유에 대한 대답이 필요합니다.당신이 검색하면 이미 이것에 대한 3 ~ 4 가지의 질문이 있습니다. 내가 연결 한 것은 승인 된 대답으로 처음 본 것입니다. – Abby

0

페이지의 head 태그와 body 태그에 namespace declaration을 추가해야합니다.

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xmlns:fb="https://www.facebook.com/2008/fbml"> 
    <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns# YOUR_NAMESPACE: http://ogp.me/ns/apps/YOUR_NAMESPACE#"> 
    <meta property="fb:app_id" content="YOUR_APP_ID" /> 
    <meta ... 

물론, 앱의 설정 YOUR_NAMESPACEYOUR_APP_ID를 교체하십시오.

1

페이스 북의 문서가 오래되었습니다. (큰 놀람이 있습니다.) 유일한 og : 유형은 here이며 어느 것도 회사가 아닙니다.