facebook-js-ads-sdk | OFFICIAL FACEBOOK SDK https | SDK library
kandi X-RAY | facebook-js-ads-sdk Summary
kandi X-RAY | facebook-js-ads-sdk Summary
[DEPRECATED] OFFICIAL FACEBOOK SDK:
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Rollup and rollup
facebook-js-ads-sdk Key Features
facebook-js-ads-sdk Examples and Code Snippets
Community Discussions
Trending Discussions on facebook-js-ads-sdk
QUESTION
Cannot create adCreative. Get an error:
Adcreative Create Failed: The Adcreative Create Failed for the following reason: Oops, something went wrong. Please try again later
and in the same error stack:
message: 'Invalid parameter' code: 1487390
My code:
...ANSWER
Answered 2017-Sep-14 at 09:03The problem was because of wrong page_id
QUESTION
PROBLEM DESCRIPTION. I'm trying to follow https://github.com/lucascosta/facebook-js-ads-sdk to install the Javascript SDK for Facebook. Before anyone objects, I am absolutely aware of the compact version (https://developers.facebook.com/docs/javascript/quickstart), but that API is absolutely useless to me. I need the one produced by Lucas Costa, in order to be able to make changes to my ads account, which the recommended script by Facebook does not enable.
As usual installation instructions (see github.com/lucascosta/facebook-js-ads-sdk) are horribly predicated on mysterious conditions, that are unbeknown to me. I cannot get the SDK to work and would like someone to tell me explicitly what to do. The crux of the problem is the paradoxical situation: I am supposed to use a require('...')
command (where??) to include the SDK (where is this supposed to be saved??) and yet require cannot be used on folders, but on scripts. Maybe somewhere there is a require.config
file, I'm supposed to set up, but I have no idea, as, like I said, the instructions completely bypass any mention of the necessary starting conditions.
Here is what I have done so far. My folder-structure looks like this (I don't even know if this is right, as no-one explains it anywhere!):
...ANSWER
Answered 2017-Jul-11 at 14:25You need to change the way you are using require.
- You cannot use the synchronous require method to load dependencies if they have not been loaded before. Hence
const adsSdk = require('facebook-ads-sdk');
will not work. You will need to use the formrequire(['name-of-script'], callback)
. - Require does not allow you to load an entire folder. You have to find the exact script you are trying to work with so
var adsSdk = require(['sdk']);
will not work.
Ultimately your code should look something like:
require(['some-facebook-script'], function(someFacebookScript) {
// Do some work here
});
The parameter passed to the callback function will be the loaded module you are trying to consume. When using the asynchronous version (as I just demonstrated) the return from require is not useful.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install facebook-js-ads-sdk
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page