php - 获取商业帐户转换前发布的媒体的覆盖面指标时出现异常[无效参数]
问题描述
这是商业帐户转换之前发布的媒体的情况。问题是我在 Facebook graph api explorer 中得到了正确的响应。
"insights": {
"data": [
{
"values": [
{
"value": 8
}
],
"id": "xxxxxxxxxxxxxxxxx/insights/reach/lifetime"
}
]
},
但是当尝试使用 api 调用时,xxxxxxxxx/media?fields=media_url,caption,comments_count,permalink,media_type,like_count,timestamp,username,thumbnail_url,insights.metric(reach){values}
我得到了
dev.ERROR:工作 >> FacebookInstagramBackTrackOwned >> 异常 >> 无效参数。
'error_subcode' => 2108006,
'is_transient' => false,
'error_user_title' => 'Media Posted Before Business Account Conversion',
'error_user_msg' => 'The media was posted before the most recent time that the user\'s account was converted to a business account from a personal account.'
解决方案
我所做的是在捕获异常部分,我检查了错误代码2108006
和error_user_title,Media Posted Before Business Account Conversion
然后在没有到达参数的情况下进行了调用,这样我就得到了所有其他数据。
推荐阅读
- haskell - 如何将 TypeRep 转换为字符串?
- scala - 定义ADT时案例对象T和案例类T()的区别?
- python - 在字符串之后拆分列表并创建新的列表列表
- sas - 我如何按我的数据对受尊重的代码进行分组
- javascript - 将带有 bind() 和参数的函数作为回调传递
- python - kivy滚动问题,滚动添加屏幕管理器?
- javascript - 调整多边形上的线条位置
- python - Pandas DataFrame KeyError 1
- angular-cli - 如何防止 Angular 在更改时重新加载我的应用程序但仍允许它保存?
- excel - 如何阻止 Excel VBA 重命名不相关模块和方法中的变量和参数?