Open spiritcoder opened 9 months ago
Version 18
I am able to generate an Iframe from the getGeneratePreview() method on ads creative, but can't load the Iframe.
const account = new faceBookSDK.AdAccount(adAccountId);
account .getAdCreatives(['id', 'body', 'image_url', 'thumbnail_url', 'object_story_spec'], {}) .then(async (creatives) => { // Process the list of creatives const indexdata = creatives[13]; const creativeFields = faceBookSDK.AdCreative.Fields; const creativeField = Object.keys(creativeFields); const adCreative = await new faceBookSDK.AdCreative(indexdata._data.id).get(creativeField); if (adCreative._data.object_story_speclink_data) { delete adCreative._data.object_story_spec.link_data.image_url; } else { delete adCreative._data.object_story_spec.video_data.image_url; } const generatepreviewss = new faceBookSDK.AdAccount(adAccountId) as any; const generatepreviews = await generatepreviewss.getGeneratePreviews(fields, { creative: adCreative, ad_format: 'mobile_feed_standard', }); console.log(generatepreviews); }) .catch((error) => { console.error(error); });
It returned an IFrame that we want to preview on the frontend but we can't load the Iframe. It shows
No permission to access this profile You don't have required permission to access this profile
Which SDK version are you using?
Version 18
What's the issue?
I am able to generate an Iframe from the getGeneratePreview() method on ads creative, but can't load the Iframe.
Steps/Sample code to reproduce the issue
const account = new faceBookSDK.AdAccount(adAccountId);
Observed Results:
It returned an IFrame that we want to preview on the frontend but we can't load the Iframe. It shows
No permission to access this profile You don't have required permission to access this profile
Expected Results: