2011-12-07 3 views
0

페이스 북의 열린 그래프를 사용하여 보내기 및 디스플레이를 사용자 정의하려고하는데 작동하지 않고 그 이유를 모르겠습니다.열린 그래프를 사용하여 페이스 북을 버튼처럼 사용할 수 없습니다.

여기 header.php 내 헤더입니다 :

<!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="https://www.facebook.com/2008/fbml"> 

<!-- Head =================================================================================================--> 

<head> 
    <title>AskSanta - <?php echo $title; ?></title> 

    <meta http-equiv="content-type" content="text/html;charset=utf-8" /> 
    <meta name="author" content="" /> 
    <meta name="distribution" content="global" /> 
    <meta name="copyright" content="Copyright &copy; 2011 by JustAskSanta. All rights reserved." /> 
    <meta name="description" content="Content to be written here" />   
    <meta name="keywords" content="Keywords to be written here" /> 
    <meta property="og:title" content="Ask Santa Online" /> 
    <meta property="og:type" content="website" /> 
    <meta property="og:url" content="http://www.justanswersanta.com" /> 
    <meta property="og:image" content="http://www.justanswersanta.com/images/santa.png" /> 
    <meta property="og:site_name" content="Ask Santa Online" /> 
    <meta property="og:description" content="Hey kids (or kids at heart)! Want to ask Santa a question? Brought to you from the North Pole by JustAnswer."/> 

여기 thankyou.php에서 같은 버튼의;

http://www.justanswersanta.com/thankyou.php

내가 잘못 뭐하는 거지 : 여기

<?php include("header.php"); ?> 

<div id="fb-root"></div> 
      <script>(function(d, s, id) { 
       var js, fjs = d.getElementsByTagName(s)[0]; 
       if (d.getElementById(id)) return; 
       js = d.createElement(s); js.id = id; 
       js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; 
       fjs.parentNode.insertBefore(js, fjs); 
      }(document, 'script', 'facebook-jssdk'));</script> 
      <div class="fb-like" data-href="http://www.justanswersanta.com" data-send="true" data-layout="button_count" data-show-faces="false" data-font="lucida grande"></div> 

출력입니까?

답변

0

코드 및 OG 태그가 올바른 것 같습니다. 귀하의 페이지가 이전 버전의 Facebook에 의해 캐시되었다고 생각합니다. Facebook에 객체 디버깅 도구가 있습니다.이 도구를 사용하면 캐시 된 페이지 정보를 새로 고칠 수 있습니다. http://developers.facebook.com/tools/debug

this link으로 내 페이지를 탐색했습니다. 이렇게하면 페이지 캐시가 새로 고쳐집니다. 이제 귀하의 웹 사이트가 올바르게 폐기되고 있습니다. 그것을 확인하십시오.

+0

아, 작동 중입니다! 정말 고맙습니다! – salmanhijazi

관련 문제