私は通常facebook javascript apiしか使用していませんが、ログインが問題を起こし始めたので、私はPHP APIを試しています。これは私のヘッダー内のAPI呼び出しです:Facebook PHP Apiをリクエストするとエラーが発生しますか?
<?
require 'stuff/facebook-php/src/facebook.php';
$facebook = new Facebook(array(
'appId' => 'my app id',
'secret' => 'secret',
));
// Get User ID
$user = $facebook->getUser();
?>
私は自分のサイト上でこれらのメッセージを得る:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/02/6945202/html/copoetry/index.php:6) in /home/content/02/6945202/html/copoetry/stuff/facebook-php/src/facebook.php on line 37
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/02/6945202/html/copoetry/index.php:6) in /home/content/02/6945202/html/copoetry/stuff/facebook-php/src/facebook.php on line 37
私が何か間違ったことをやっているか、問題何ができますか?おかげ
MMMであることを確認している場合
は
?>
を使用しないでください。オープンタグは<?php – ThatGuy