Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catchable fatal error Object of class stdClass #95

Closed
filippodicostanzo opened this issue Mar 31, 2017 · 5 comments
Closed

Catchable fatal error Object of class stdClass #95

filippodicostanzo opened this issue Mar 31, 2017 · 5 comments

Comments

@filippodicostanzo
Copy link

filippodicostanzo commented Mar 31, 2017

Catchable fatal error: Object of class stdClass could not be converted to string

\InstagramScraper\Instagram.php on line 529

require('autoload.php');

use InstagramScraper\Instagram;
Unirest\Request::verifyPeer(false);

$instagram = Instagram::withCredentials('username', 'password', '/cached');
$instagram->login();

$account = $instagram->getMediaById(1448575070213480221);

echo json_encode($account);

@filippodicostanzo filippodicostanzo changed the title PHP fastcache not found class Driver Catchable fatal error Mar 31, 2017
@filippodicostanzo filippodicostanzo changed the title Catchable fatal error Catchable fatal error Object of class stdClass Mar 31, 2017
@javagose
Copy link

javagose commented Apr 4, 2017

i have the same error here #76

@raiym
Copy link
Member

raiym commented Apr 5, 2017

Thank you for raising issue I will check it soon

@matkozikowski
Copy link

Hello,
If this bug was fixed ?

@matkozikowski
Copy link

Ok I found the reason. The Instagram log out my account. When I log in via Instagram website. Api start working.
It looks like the PI don't login account.

@ht22pt
Copy link

ht22pt commented Aug 14, 2017

I found "Object of class stdClass could not be converted to string" in exception will not throw to cast, it crash process and exit.
Because : $response->body in error of Intastagram now is stdClass not string.
Example:

throw new InstagramException('Response code is ' . $response->code . '. Body: ' . var_dump($response->body) . ' Something went wrong. Please report issue.');

Will not throw to catch InstagramException, it will exit.

@raiym raiym closed this as completed Dec 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants