【发布时间】:2015-03-04 06:35:31
【问题描述】:
使用 facebook ad api,我可以发送查询以检索广告图像信息。
以下是来自 facebook doc 的示例。 https://developers.facebook.com/docs/reference/ads-api/adimage/v2.2
curl -G \
-d "access_token=<ACCESS_TOKEN>" \
"https://graph.facebook.com/act_<ACCOUNT_ID>/adimages"
curl -G \
-d "hashes=[%220d500843a1d4699a0b41e99f4137a5c3%22,%22012feg987e98g789f789e87976210983%22]" \
-d "access_token=<ACCESS_TOKEN>" \
"https://graph.facebook.com/act_<AD_ACCOUNT_ID>"
两个调用都可以正常工作。但问题是:它们只返回图像 id 和图像哈希的数组,没有别的。同样,来自 facebook doc 的示例。我的测试显示了相同格式的响应。
{
"data": {
{
"hash": "0d500843a1d4699a0b41e99f4137a5c3",
"id": "16522000:0d500843a1d4699a0b41e99f4137a5c3"
},
{
"hash": "012feg987e98g789f789e87976210983",
"id": "16522001:012feg987e98g789f789e87976210983"
}
},
"paging": {
"cursors": {
"before": "NDIyNDAzMzc0NDY4NjQxOjE2...",
"after": "NDIyNDAzMzc0NDY4NjQxOmU5Njg..."
}
}
}
广告图片对象应该具有“url”、“width”、“height”等属性。但无论我尝试什么,我都无法检索到除了 id 和 hash 之外的任何内容。
有什么方法可以使用图像哈希或广告帐户 ID 获取缩略图 url 或其他图像属性?
我最终想要实现的是从手动管理迁移到基于 api 的自动管理,并获取已经上传到 facebook 的图像的 url/属性(保存在数据库中并在必要时重复使用)。
【问题讨论】: