我在laravel
上收到此错误ClientException in Middleware.php line 69:
Client error: 400
in Middleware.php line 69
at Middleware::GuzzleHttp\{closure}(object(Response)) in Promise.php line 199
at Promise::callHandler('1', object(Response), array(object(Promise), object(Closure), null)) in Promise.php line 152
at Promise::GuzzleHttp\Promise\{closure}() in TaskQueue.php line 60
当我执行此代码以调用Facebook API
时$client = new GuzzleHttp\Client();
foreach($buzzes as $buzz ){
$link = $buzz->link;
$link_part = explode('/', $link);
$post_id = $link_part[5];
if(is_numeric($post_id)){
//Check if we can embed the video / not live / not private
$url = 'https://graph.facebook.com/v2.6/'.$post_id.'/?fields=embeddable,live_status&access_token='.$permanent_token;
//dd($response->getBody());
$response = $client->request('GET',$url);
echo $response->getBody().'<br />';
}
}
我不知道如何修复此错误