以下のコードを実行した後、アプリから複数のアプリ ユーザーにバッチ通知を送信しようとしていますが、応答でエラーが発生します。
"{"error":{"message":"(#100) Must specify a non-empty template `param","type":"OAuthException","code":100}}"`
テンプレートパラメータは設定されていますが...
私が間違っていることについての助けに感謝します..
私が使用するコードは次のとおりです。
$batched_request = array();
foreach ($users as $idx => $user) {
$request = array(
'method' => 'POST',
'relative_url' => '/' . $user['id'].'/notifications',
'access_token' => $app_access_token,
'template' => $template,
'href' => $href
);
$batched_request[] = json_encode($request);
}
$params = array('batch' => '[' . implode(',',$batched_request) . ']' );
try {
$response = $facebook->api('/','POST',$params);
} catch(FacebookApiException $e) {
error_log($e);
}