我正试图通过Facebook的各种API来找出以下内容:
提前谢谢!
发布于 2015-05-20 15:51:31
您所要做的一切都可以通过Graph和Marketing API获得。
1)是的,正如您指出的,这是可能的。您可以阅读更多的here
2) --我建议您阅读上面链接的营销API文档,以了解广告的完整结构。但是简单地说,广告被分成以下四个对象:
3)当一篇文章有一个基于它的广告创建时,没有为广告目的创建的“重复”文章。如果您只想在帖子上获得付费/增加信息,那么最好的方法是使用Ads Insights API。
4)当您从洞察API中提取统计数据时,您将看到附加了“付费”的度量标准,例如‘post_印象_’。这将返回您的付费印象的数量(即从一个广告),但它不会给你任何信息,广告造成这些印象。广告洞察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"https://stackoverflow.com/questions/30247471
复制相似问题