我正在尝试使用图像字节将 AdImages 上传到 Facebook 营销 API。现在我只是使用 Graph Explorer 在沙盒帐户上测试内容。
我使用以下代码从 URL 中以字节形式获取图像:
$bytes = base64_encode( file_get_contents( 'https://example.com/PATH/TO/image.jpg' ) );
当我这样做时,我收到此错误:
{
"error": {
"message": "Invalid parameter",
"type": "OAuthException",
"code": 100,
"error_subcode": 1487242,
"is_transient": false,
"error_user_title": "Image Resize Failed",
"error_user_msg": "Image Resize Failed:unknown reason",
"fbtrace_id": "DvqRl8YMleC"
}
}
更新:我将此问题报告为 Facebook 上的错误,他们已升级该问题。
最佳答案
只有当 bytes
参数是 Post 参数时才会被接受。
关于facebook-marketing-api - Facebook Marketing API AdImage 上传 - 图像调整大小失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55307454/