"message": "(#294) Managing advertisements requires an acess token with the extended permission for ads_management" - facebook

I'm trying to test my server to server app and my app is an website. But the calls to the marketing API are done from my node js server. I am able to create campaigns and Adsets, but not the Ads. when I try, I'm reciving this error message on marketing api calls to create Ads:
"message": "(#294) Managing advertisements requires an acess token with the extended permission for ads_management".
The thing is, I have already been approved to use ads_management, but when I try to set my app to public, so I can create Ads, the "Generate Token" tool of my app become disabled.
I have also asked permission to use Api Standard Access mode (instead of development mode), but it was denied due to unsuccessful api calls. But how can I have successful api calls if I can't generate an access token with ads_managment permissions, neither can I create Ads while in development mode?

Related

(#270) This Ads API request is not allowed for apps with development access level (Development access is by default for all apps

My Facebook application is in online mode, but this error will be reported when calling "/business_id/adspixels". What should I do to avoid this error.
I have tried to apply for various permissions, such as ads_ read、business_ management、attribution_ Read. However, this error will still occur.
{"message":"(#270) This Ads API request is not allowed for apps with development access level (Development access is by default for all apps, please request for upgrade). Make sure that the access token belongs to a user that is both admin of the app and admin of the ad account","type":"OAuthException","code":270,"fbtrace_id":"ABi7JUtohVnMy5rYCCmp-P1"}

Unsupported post request while making facebook graph API request to post data in Catalog

I am beginner in Facebook Graph API and While making the post request to "/{catalog_id}/batch" I get the following error: "Unsupported post request. Object with ID '<catalog_id>' does not exist, cannot be loaded due to missing permissions, or does not support this operation." with error_code:100 and error_subcode:33.
I suppose this error is due to the lack of write permission for catalog_management for which an App review is required. But when the app is in development mode and we need to push the test data to catalog, I don't think we need app review and there must be any solution to push test data using "catalog batch API" method without requesting the app review.
Also while trying to generate token from system user, all the permission selection check box are disabled.
response from graph API call
permission code selection while generating token from system user

facebook - custom audience export testing

We have an app to export custom audiences to Facebook for marketing purposes. The app is in development mode. I would like to setup an automated test to trigger these exports with. I have tried creating new real facebook accounts to do this which works, but they always seem to get flagged and blocked before long. I have also tried the "test users" available under the roles and they work for the oauth step, but they fail with this error as soon as I attempt to export the audience:
Error executing rest api call - {"error":{"message":"(#272) This Ads
API call requires the user to be admin of the application. User is not
admin or developer of this
application.","type":"OAuthException","code":272,"fbtrace_id":"G/93tjhM3pH"}}
Is it possible to setup a facebook account that will not get constantly de-activated and still be allowed to export custom audiences?
Thanks.

VK API, access denied for post on wall of a community, fail WALL Permissions

I build API for post on my community of VK. But I check my permission for my app, and I have all permissions, but not load WALL permissions.
In the scope for OAuth, I put all scopes and not work the WALL. I check the "Api.console" and they have "Access to Wall - The application has access to your wall", but in my app not appear.
This is the response:
{"error":{"error_code":15,"error_msg":"Access denied: no access to call this method","request_params":[{"key":"oauth","value":"1"},{"key":"method","value":"wall.post"},{"key":"owner_id","value":"-*********"},{"key":"from_group","value":"1"},{"key":"message","value":"New post on group wall via API."}]}}
I check other services and if work.
You can't call wall.post (and a lot of other methods) with a non-standalone applications. It seems like your VK application is of type Website or iFrame - they have limited access to the API methods.
However, while you can't call this method from non-standalone applications, can via the Open API (it's a JavaScript SDK for Website applications) or the JavaScript SDK for iFrame applications.
When you call wall.post via these SDKs, a confirmation window will appear where the user needs to confirm the wall post before sending it:
Standalone applications are designed to be used in apps like mobile or desktop clients or browser extensions (because they don't have CORS limitations and may read any tab). There is absolutely no ways to get a user's standalone access token without limitations if you are trying to authorize them via website.
If you are building website or something and need wall.post for service purposes (e.g. news cross-posting), then you may get your token and save it anywhere in site configuration. Open this address:
https://oauth.vk.com/authorize?client_id={APP_ID}&scope={PERMISSIONS}&v={ACTUAL_API_VERSION}&response_type=token&redirect_uri=https://oauth.vk.com/blank.html
{APP_ID} - your standalone application ID (may be found in application Settings).
{PERMISSIONS} - comma-separated list of permissions. Don't forget the offline permission to get token that doesn't expire.
{ACTUAL_API_VERSION} - VK API version.
Example:
https://oauth.vk.com/authorize?client_id=123456&scope=wall,offline&v=5.60&response_type=token&redirect_uri=https://oauth.vk.com/blank.html
Note that redirect_uri=https://oauth.vk.com/blank.html is required to get token without the above mentioned limitations.
After you grand your application access to your account, access token without limitations will appear in your browser address bar. Just copy it, save in your configs and feel free to call any methods you want.
Late but...for this you need to first create a sort of "demo" app for VK using the standalone app type which would issue you an access token inside the address bar when you set the redirect link to https://oauth.vk.com/blank.html
This access token would allow you to share to your personal profile wall.
Then you need to contact VK support and display your app in action. Once they approve it then you'd be able to use a "Website" app that has OAuth style authentication

How to generate Facebook Marketing API access token to use it in Windows application

I am using Facebook as advertising platform to promote my application on Apple and Google stores. I would like to make windows service which will download daily report(s) about advertising status of my marketing campaign running one Facebook, preferably using 60 day token, or some permanent solution so that token is retrieved when required. I think that i understand everything to do this except how to generate access token to use it with Facebook Graph API. Which token for which Facebook account do I need and how to obtain it?
You'll need a Facebook app and to grant that app the ads_read permission in order to retrieve reports about your advertising efforts via the API (source).
You'll want a long-lived token so that you don't have to re-authenticate very often. The access token documentation details the steps to exchange a short-lived token for a long-lived one.
You may also want to consider managing the app, ad account, and access tokens (via a business system user) with the FB Business Manager.
Create a facebook app.
Go to the Graph API Explorer in Facebook's Tools & Support section.
Pick your app from the drop down.
Hit Get Token > Get User Access Token.
In Select Permissions choose required permissions or select them from extended permissions.
Use the user access token that will be presented to you in the access token form input field.