facebook ads api
api测试
https://developers.facebook.com/tools/explorer/517735271920003?method=GET&path=act_1107316072738457%2Finsights%3F%26fields%3Dclicks%2Cimpressions%2Cspend%26level%3Daccount%26breakdowns%3D%26time_increment%3D1%26time_range%3D%7B'since'%3A'2017-11-26'%2C'until'%3A'2017-12-26'%7D&version=v2.11
me/adaccounts
#getting ad accounts 获取到ad node
2、FB.api('/me/adaccounts'); FB.api('/me/adaccounts?fields=id,name'); FB.api('act_221377094983518?fields=id,name');
#creating campaigns 创建广告系列
3、FB.api('/act_221377094983518/campaigns', 'POST', {'name':'我的广告','objective':'LINK_CLICKS'}); MOBILE_APP_INSTALLS
、CONVERSIONS
等
#updating campaigns 修改广告系列的相关设置
4、FB.api('23842545377820361', 'POST', {'status':'PAUSED'}); //暂停
app 添加products:marketing api
添加account授权
获取token
获取userid、过期时间、short time access token
获取long time user access token:(60天有效期)
oauth/access_token?grant_type=fb_exchange_token&client_id=***********&client_secret=********&fb_exchange_token={short-time-access-token}
获取app access token:
oauth/access_token?client_id=********&client_secret=**********&grant_type=client_credentials
获取short time user access token:(2小时有效期)
登陆=》调用callbackurl,给出accesstoken=》添加app id、app secret后获取long time access token=》保存=》调用接口使用
类似授权登陆的流程
接口调用,graph api explorer可以不用添加param:access_token={valid access token}
me/adaccounts
{user id}/adaccounts
act_{ads account id}/users
/// <summary>
/// SystemUserId or UserId.
///
///( SystemUserId
/// https://graph.facebook.com/API_VERSION/BUSINESS_ID/system_users
/// ref:https://developers.facebook.com/docs/marketing-api/businessmanager/systemuser)
///
///( UserId
/// ref:https://developers.facebook.com/docs/graph-api/reference/user/
/// https://graph.facebook.com/API_VERSION/me/ids_for_business)
/// </summary>
act_{ads account id}/insights?
act_{ads account id}/insights?fields=account_id,account_name,campaign_id{cost_per_action,results},campaign_name,date_stop,date_start,clicks,impressions,total_action_value,total_actions,spend,actions,action_values,website_purchase_roas,reach&level=account&breakdowns=&time_increment=1&action_attribution_windows=1d_view,28d_click,default&time_range={'since':'2018-01-01','until':'2018-01-22'}
#facebook 获取report
curl "https://graph.facebook.com/v2.11/act_1534433596654710/insights?access_token=************************&fields=account_id,account_name,campaign_id{cost_per_action,results},campaign_name,d
ate_stop,date_start,clicks,impressions,total_action_value,total_actions,spend,actions,action_values,website_purchase_roa
s,reach&level=account&breakdowns=&time_increment=1&action_attribution_windows=1d_view,28d_click,default&time_range={'sin
ce':'2018-01-01','until':'2018-01-29'}"
https://developers.facebook.com/docs/applinks/metadata-reference
https://developers.facebook.com/docs/marketing-api/dynamic-product-ads/debugging-tools/event_statistics/v2.12
https://developers.facebook.com/docs/marketing-api/reference/ad-campaign-group/insights/
https://developers.facebook.com/docs/marketing-api/reference/ad-report-run/
https://developers.facebook.com/docs/marketing-api/targeting-specs
https://developers.facebook.com/docs/marketing-api/targeting-search#country_group
https://developers.facebook.com/docs/marketing-api/reference/ads-action-stats/ #action_device
facebook ads api的更多相关文章
- Facebook广告API系列 3 Ads Management
Facebook广告API系列 3 Facebook marketing API有三大组成部分: Audience Management Ads Management Ads Insights 本篇介 ...
- Facebook广告API系列 2 - Audience Management
Facebook广告API系列 2 Facebook marketing API有三大组成部分: Audience Management Ads Management Ads Insights 本篇稍 ...
- Facebook广告API系列 1
Facebook广告API系列 1 前言 最近遇到大坑了,居然要去对接facebook的广告API,之前以为是跟鹅厂一样的API体系,看了半天Facebook的文档,冷汗直冒.... 这得一点一点的讲 ...
- Facebook广告API系列 Business Manager
Facebook广告API系列 Business Manager Business Manager,是个很牛叉的东西,有多牛叉呢? 因为facebook已经越来越商业化了,上面的每个账号,页面,往往都 ...
- facebook graph api 报错SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)')
使用facebook graph api,报错如下 一开始以为是https证书验证失败,查了一下午源码,没有看到问题,于是把Python27\lib\site-packages\requests\ad ...
- FaceBook登陆API -- Login with API calls
Login with API calls Related Topics Understanding sessions FBSession Error handling FBError FBLoginC ...
- facebook chat api 使用
官方API文档: https://developers.facebook.com/docs/chat/ 下面是根据文档修改的类: <?php class Invite_Chat{ protect ...
- facebook javascript api 使用
官方api文档:http://developers.facebook.com/docs 先简单的介绍下创建一个app(https://developers.facebook.com/apps),
- Facebook Graph API 接口请求
Graph API 调试器 这两天因项目需求,在调试FB的接口.项目的应用在FB上面.L特傻.没有区分FB的api的使用方式. 因为应用是在FB上面的.所以在登录应用的时候,就已经登录了FB平台.对于 ...
随机推荐
- OC 反射-->动态创建类
系统方法 NSLog(@"%s", __func__); //打印出类的方法名称,如: //打印结果:2018-02-22 10:52:15.394575+0800 DemoRun ...
- .net nancy
官网 文档 入门教程 参考
- Spark学习之路 (十一)SparkCore的调优之Spark内存模型
摘抄自:https://www.ibm.com/developerworks/cn/analytics/library/ba-cn-apache-spark-memory-management/ind ...
- Linux基础命令---uniq
uniq 将文件中重复出现的行删除,结果送到标准输出或者指定文件.在使用uniq指令之前,必须使用sort对内容进行排序,否则没有效果.如果没有选项,则将匹配的行合并到第一个匹配项. 此命令的适用范围 ...
- java springboot activemq 邮件短信微服务,解决国际化服务的国内外兼容性问题,含各服务商调研情况
java springboot activemq 邮件短信微服务,解决国际化服务的国内外兼容性问题,含各服务商调研情况 邮件短信微服务 spring boot 微服务 接收json格式参数 验证参数合 ...
- windows下多个python版本共存,如何在Windows7系统上安装最新的64位Python3.6.2
windows下多个python版本共存,如何在Windows7系统上安装最新的64位Python3.6.2 1.官网下载python3.6.2https://www.python.org/ftp/p ...
- flask 的类中间件
需求 : 如果登陆了,就可以访问 index 和 home 页面,如果没登录就跳转到 login 登录 要怎么解决呢, session 对, 用 session 除了 Login 函数之外的所有函数里 ...
- VMWare常用快捷键
VMWare常用快捷键 Ctrl-Alt-Enter 进入全屏模式 ctrl+alt+insert 退出全屏 Ctrl-Alt 返回正常(窗口)模式 Ctrl-A ...
- SSM整合Mybatis-Spring
mybatis -Spring 整合 cn.kitty.bean public class Book { private int bookid; private String bookname; pr ...
- The logback manual #02# Architecture
索引 Logback's architecture Logger, Appenders and Layouts Effective Level(有效等级)又名Level Inheritance Ret ...