Application does not have permission error when trying to add user to facebook ad account

纵饮孤独 提交于 2019-12-12 04:32:28

问题


I have facebook business account. I am seeing following error.

(#10) Application does not have permission for this action

When trying to add user to ad account using following code.

$attachment = array('access_token' => $accessToken,
'uid' => $fb_user_id,
'role' => '1001');

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'https://graph.facebook.com/v2.8/act_'.$ad_account_id.'/users');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $attachment);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);

I have already Ads Management Basic Access, Ads Management API Standard Access and business_management access level.

I am doing RND on this from last few days but not getting any hint what can be the problem so can anyone give me suggestions what can be the exact problem?

来源:https://stackoverflow.com/questions/40148315/application-does-not-have-permission-error-when-trying-to-add-user-to-facebook-a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!