0
我有发布要约页面(我是管理员)通过Facebook API的问题。这是工作,当我张贴饲料到这个页面,但不是提供。这总是返回给我带有消息的FacebookSDKException:无效的参数。我使用PHP(Laravel框架),但我认为这对我使用的语言无关紧要。我使用此代码:无效的参数在发布要约facebook api
try {
$response = $fb->post('/' . $page_id . '/offers' , $offerData, (string) $request->access_token
);
} catch (\Facebook\Exceptions\FacebookSDKException $e) {
return response()->json(['error'=>$e->getMessage(),
], 200);
}
其中我的“$ request-> access_token”是页面访问令牌。在我的“$ offerData”我有这个字段:
$offerData =[
'claim_limit'=>8,
'expiration_time'=>\Carbon\Carbon::now()->addDays(10)->toDateTimeString(),
'message'=>"bbb",
'title'=>"ascvc",
'coupon_required'=>false,
'image_url'=>'...',
'published'=>true,
'reminder_time'=>\Carbon\Carbon::now()->addDays(5)->toDateTimeString(),
// 'scheduled_publish_time'=>5
];
我也试图通过卷曲(不是第一码),并卷曲返回类似的错误信息做到这一点。
"{"error":{"message":"Invalid parameter","type":"OAuthException","code":100,"error_subcode":1528104,"is_transient":false,"error_user_title":"Check Your Admin Permission Level","error_user_msg":"Only some admins of your Page are able to create and edit offers. Talk to the person responsible for your Page about your admin permission level.","fbtrace_id":"..."}}"
它看起来有问题,权限,但在登录Facebook的我设置权限:
['manage_pages', 'pages_show_list', 'email',
'user_hometown', 'publish_actions', 'user_photos', 'publish_pages']
我不知道在哪里的问题。我必须告诉你,同一页面上的提要工作正常,但不提供。你能帮我吗?
这是不是你从用户要求授予您的应用程序的权限,但什么样的水平管理员权限的人在页面设置已经分配。 – CBroe