我正在尝试将自定义受众与php fb sdk同步。我的脚本如下所示:
foreach ($users->pluck('email') as $email) {
$hashed[] = [hash('sha256', $email)];
}
try {
(new CustomAudience('custom-audience-id'))
->createUsersReplace([], [
'payload' => [
'schema' => [
'EMAIL',
],
'data' => $hashed,
],
'session' => [
'session_id' => rand(1, 10000000),
'batch_seq' => 1,
'last_batch_flag' => true,
'estimated_num_total' => count($hashed),
],
]);
} catch (Exception $ex) {
$this->info($ex->getMessage());
}
脚本成功运行,当我查看历史选项卡时,FB 告诉我 x 记录已成功替换:
但是,大小未更新(处理几个小时后):
当我通过 Excel 表手动上传记录时,大小会正确更新。显然,我的 PHP 脚本出了点问题,但不知道出了什么问题。