Questions about Boosted Facebook Posts

I am trying to figure out if the following is possible through the various Facebook APIs:

  • Create a message on the page via the API (I know that is possible :)
  • Enlarge this post through the ads API (I read that it’s possible, but I can’t really find an API that would allow me to do this. If you know this, please indicate this! Thanks!)
  • After the promotion, is there a way I can get the increased message information from the original message? I guess it once went up, post reinforcement is a different version of the original post, right?
  • I can get message stats through the Insight API, and I can get increased visitor stats through the various ad statistics APIs. Only message statistics apply to the message, and increased message statistics apply only to the reinforced post, or are they all the same set of characteristics that applies to both?

Thank Advance

+4
source share
1 answer

Everything you want to do is available through the Graph and Marketing APIs .

1) Yes, it is possible, as you indicated. You can read here

2). Marketing API, , . , , 4 :

  • . , -, .
  • . - , , , , .
  • . , . , , . , , , .
  • . , .

3). , , "" . / , - API .

4). API , "", "post_impressions_paid". (.. ), , . Ad Insights API , , .., , , .

cURL, Post, , API , , .

// First we need to get the Ad Account from a user
curl https://graph.facebook.com/{USER_ID}/adaccounts&access_token={TOKEN}

// Now we can create our Ad Campaign. Response: {"id": "CAMPAIGN_GROUP_ID"}
curl \
-F 'name=my campaign group' \
-F 'campaign_group_status=PAUSED' \
-F 'objective=POST_ENGAGEMENT' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adcampaign_groups

// Using the Campaign Group ID we can create an Ad Set. Response: {"id": "AD_SET_ID"}
curl \
-F "name=My Adset" \
-F "bid_type=CPC" \
-F "bid_info={'CLICKS': 500}" \
-F "campaign_status=ACTIVE" \
-F "daily_budget=2000" \
-F "campaign_group_id=<AD_CAMPAIGN_ID>" \
-F "targeting={'geo_locations':{'countries':['US','GB']}}" \
-F "access_token=<ACCESS_TOKEN>" \
"https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adcampaigns" 

// Before we create an Ad Group, it is recommended to create an Ad Creative. 
// Response: {"id": "CREATIVE_ID"}
curl \
-F "name=sample creative" \ 
-F "object_story_id=<POST_ID>" \
-F "access_token=<ACCESS_TOKEN>" \
"https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adcreatives"

// Now that we have the Creative ID we can use that to create the final piece
// of the puzzle, the Ad Group. Response: {"id": "AD_GROUP_ID"}
curl \
-F "name=my ad" \
-F "campaign_id=<AD_SET_ID>" \
-F "creative={'creative_id':<AD_CREATIVE_ID>}" \
-F "adgroup_status=PAUSED" \
-F "access_token=<ACCESS_TOKEN>" \
"https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adgroups"
+6

All Articles