create ad that related to instagram post with facebook marketing api

Digital Marketing Facebook Marketing API 3 years ago

9.53K 1 0 0 0

_x000D_ _x000D_ TL;DR: how to create ad in business manager that connected to instagram post? I am using facebook marketing api to creating ads in the business manager that promote posts from my facebook page. I have instagram business account that connected with my facebook page and I want to be able creating ad with posts from my instagram account through the facebook marketing api (or any other api), this is possible? my code for creating ads with posts from my facebook page: Creating ad creative adsSdk.FacebookAdsApi.init(accessToken); const AdAccount = adsSdk.AdAccount; const account = new AdAccount(accountId); let fields = ['id', 'object_story_id']; let params = { 'name': 'Ad Creative test', 'effective_instagram_story_id': facebookPostId }; account.createAdCreative(fields, params).then(res =>{ console.log(`ad creative created successfully with id ` + res.id); }); Creating ad adsSdk.FacebookAdsApi.init(accessToken); const AdAccount = adsSdk.AdAccount; const account = new AdAccount(accountId); let fields = ['id']; let params = { 'name': 'New Ad', 'adset_id': adsetId, 'creative': '{\'creative_id\':' + creativeId + '}', 'status': 'PAUSED', }; account.createAd(fields, params).then(res => { console.log(`ad created successfully with id ` + id); }); If I just giving instagram post id instead of facebook post id I get error. Thanks for any kind of help :)

User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 3 years ago
_x000D_ Create add using new AdAccount(id, context).createAdCreative() .setName("Promoted Post") .setObjectStoryId("_") .execute(); You can verify that your instagram account is linked using instagram_accounts if not try page_backed_instagram_accounts for verify try to implement: https://graph.facebook.com/v3.2/[pageId]?fields=instagram_accounts https://graph.facebook.com/v3.2/[pageId]?fields=page_backed_instagram_accounts
0 views
0 shares

No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Similar Forum


Q

What are the best SEO tools for a personal website? What website or tools should I use to build and...

What are the best SEO tools for a personal website? What website or tools should I use to build and...
Q

Why is keyword research important?

Why is keyword research important?
Q

What is SEO ?

What is SEO ?