ixudra / curl

Custom PHP curl library for the Laravel 5 framework - developed by Ixudra
MIT License
561 stars 128 forks source link

after update asJson() doesn't work. #11

Closed mean-cj closed 8 years ago

mean-cj commented 8 years ago

ErrorException in Builder.php line 265: json_decode() expects parameter 1 to be string, object given

at HandleExceptions->handleError('2', 'json_decode() expects parameter 1 to be string, object given', '.../vendor/ixudra/curl/src/Ixudra/Curl/Builder.php', '265', array('options' => array('1', '1', '0', '0', '30', '', 'https://graph.facebook.com/10208651500075198/picture?redirect=false&type=large', '0', array('Content-Type: application/json')), 'response' => object(stdClass))) at json_decode(object(stdClass), false) in Builder.php line 265

      $picture_json = \Curl::to("https://graph.facebook.com/{id}/picture")
            ->withData( array( 'redirect' => 'false' ) )
            ->asJson()
            ->get();
elimentz commented 8 years ago

Solved. Thanks for submitting the issue!