我正在尝试将facebook php sdk加载到wordpress模板中。我已将代码添加到标题中。php文件:
locate_template( \'facebook/facebook.php\', true );
$facebook = new Facebook(array(
\'appId\' => appid,
\'secret\' => appsecret
));
$signedRequest = $facebook->getSignedRequest();
if ( isset($signedRequest[\'app_data\']) )
{
echo $signedRequest[\'app_data\'];
}
但我得到了这个错误:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent..
如何在加载任何其他文件之前加载facebook sdk