-1
require_once "src/facebook.php";
$facebook = new Facebook();
$app_id = "xxxxxxxxxxx";
$app_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxx";
$app_access_token = $app_id . '|' . $app_secret;
$response = $facebook->api('/user_id/notifications', 'POST', array(
'template' => 'xxxxxxxxxxxxx',
'href' => '',
'access_token' => $app_access_token
));
這是我的工作代碼。但我得到錯誤。Facebook Api Error Missing論據
代碼工作正常,但得到此錯誤。
Warning: Missing argument 1 for Facebook::__construct(), called in
/xx/xx/xxxx.php on line 6 and defined in/home1/x/xx/xx/facebook.php on line 57
RTFM:https://developers.facebook.com/docs/php/gettingstarted/#install – CBroe