Closed zengyi584920 closed 8 years ago
Hello! Make sure your AD account has all the necessary access rights to promoted page. I have had a couple of the same problems and all of them was solved only using careful transfer of all parameters and checking of all access rights. There is no framework or api issue. May be the error message can be a little bit more informative...
if (!$_SESSION['facebook_access_token']) {
$permissions = [
'user_religion_politics',
'user_tagged_places',
'user_videos',
'user_website',
'user_work_history',
'read_custom_friendlists',
'read_insights',
'read_audience_network_insights',
'read_page_mailboxes',
'manage_pages',
'publish_pages',
'publish_actions',
'rsvp_event',
'pages_show_list',
'pages_manage_cta',
'pages_manage_instant_articles',
'ads_read',
'ads_management',
'pages_messaging',
'pages_messaging_phone_number',
'public_profile',
'user_friends',
'email',
'user_about_me',
'user_birthday',
'user_education_history',
'user_events',
'user_games_activity',
'user_hometown',
'user_likes',
'user_location',
'user_managed_groups',
'user_photos',
'user_posts',
'user_relationships',
'user_relationship_details'
];
$loginUrl = $helper->getLoginUrl('http://192.168.1.223:8888/admin.php/welcome/GetToken', $permissions);
echo '<a href="' . $loginUrl . '">Log in with Facebook</a>';
You should assign in the business manager your api user to promoted page with "page advertiser" rights. And check that you pass correct PAGE_ID. The careful checking is the only way to defeat this problem because even if you'll look at CURL response from the server you'll not find any additional useful information according to this problem.
Well, THS for your help. I will try it with other PAGE_ID.
This is a error message:
Array ( [error] => Array ( [message] => Invalid parameter [type] => OAuthException [code] => 100 [error_subcode] => 1885183 [is_transient] => [error_user_title] => Ads creative post was created by an app that is in development mode [error_user_msg] => Ads creative post was created by an app that is in development mode. It must be in public to create this ad. [fbtrace_id] => CUU1vYFcOT0 )
)
It's a development mode error.
Hey @zengyi584920, just go to https://developers.facebook.com/apps/<YOUR_APP_ID>
, select App Review and click on the button to make the app public.
OK,thanks for your help
This is my codes
The return message is "Invalid parameter" , who can help me? I realy can't find out this issue.
My english is so bad..Sorry.
But, i try it use this codes, it is success.
i don't know where is wrong. Help me! THS.