Application does not have permission error when tr

2019-09-15 02:27发布

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?

0条回答
登录 后发表回答