2010-05-12 3 views
1

here에서 이전 라이브러리를 설치하고 facebook.php 파일을 추출하고 index.php 파일을 hello "username"을 표시하는 색인 ​​.php 파일과 함께 같은 폴더에 작성했습니다. 하지만 브라우저에서 실행될 때 index.php에 아무 것도 표시되지 않으면 문제가 발생합니다.facebook을 사용하는 방법 old client library

내 시스템에 xamp가 설치되어 있습니다.

내 index.php를 코드는 다음과 같습니다 대신 "IFrame을"의

<?php 
// Copyright 2007 Facebook Corp. All Rights Reserved. 
// 
// Application: birthdaypost 
// File: 'index.php' 
// This is a sample skeleton for your application. 
// 

require_once 'facebook.php'; 

$api_key = 'fda501108b3b955bcf0f87a4008bc786'; 
$secret = '833b35812a3e6b379a5158b2f3f0611f'; 
$facebook = new Facebook($api_key, $secret); 
$user_id = $facebook->require_login(); 
// Greet the currently logged-in user! 
echo "<p>Hello, <fb:name uid=\"$user_id\" useyou=\"false\" />!</p>"; 


?> 

답변

0

설정 페이스 북 앱 캔버스 설정을 "FBML".

에코 라인과 같이 보이는 있는지 확인하십시오

에코 : "/>"거짓 \ "\ useyou ="\ "안녕하세요 < FB 이름 UID = \"$ USER_ID를