내가 수동으로 설치 한 페이스 북의 의견을 얻을 동의하지만, commentbox 아래 오류 메시지가 계속되지 않습니다페이스 북의 코멘트를 내 워드 프레스 블로그에 퍼머
경고 : http://invalid.invalid/?php%20echo%20get_permalink();%20>에 연결할 수 없습니다?가.
내 헤더에 넣고 :
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">
과 :
<meta property="og:title" content="<?php echo get_the_title(); ?> "/>
<meta property="og:url" content="<?php echo get_permalink(); ?>"/>
<meta property="og:image" content="xxxxxxxxx"/>
<meta property="og:description" content="<?php
while(have_posts()):the_post();
$out_excerpt = str_replace(array("\r\n", "\r", "\n"), "", get_the_excerpt());
echo apply_filters('the_excerpt_rss', $out_excerpt);
endwhile; ?>"/>
<meta property="fb:app_id" content="xxxxx">
<meta property="fb:admins" content="xxxxx"/>
내 single.php 파일에 나는이 추가 : 나는 내 사이트를 확인
<?php if (in_category('randomposts')) {
echo '<div></div>';
} else {
echo '<div class="fb-comments" data-href="<?php echo get_permalink(); ?>" data-num-posts="5" data-width="640"></div>';
}
?>
페이 스북 디버거/linter 거기 아무런 문제가 나타납니다. 댓글 상자는 내 페이지에 표시되지만 그 경고는 나를 괴롭 히고 있습니다. 페이스 북과 공유 할 수 있지만 URL로
http://invalid.invalid이 표시됩니다. 문제는 내 single.php 파일의 'echo get_permalink'입니다. 대신 홈페이지 URL을 입력하면 아무런 경고가 표시되지 않고 모든 기능이 작동합니다 (단, 홈페이지 URL과 게시물 URL은 공유하지 않습니다). 당신이이
echo
년대를
http://www.itrainmymind.com/this-is-a-tespost/
감사합니다 scibuff, 효과가있었습니다! – napionder