Instagram-php-scraper: Get Account By ID not working

Created on 8 Dec 2018  路  9Comments  路  Source: postaddictme/instagram-php-scraper

Getting this error while calling this function getAccountById()

PHP Fatal error: Uncaught InstagramScraper\Exception\InstagramException: Respons
e does not JSON

wontfix

Most helpful comment

WorkAround to get username, if the user has a media

$id = TARGET_USER;
$media_id = $instagram->getMediasByUserId($id)[0]->getId();
$username = $instagram->getMediaById( $media_id )->getOwner()->getUsername();

All 9 comments

const ACCOUNT_JSON_PRIVATE_INFO_BY_ID = 'https://i.instagram.com/api/v1/users/{userId}/info/';

Does not work any more.

I doubt there is any other way

Same thing here.. Is there any other way to fetch account information by using an Id ?

+1

WorkAround to get username, if the user has a media

$id = TARGET_USER;
$media_id = $instagram->getMediasByUserId($id)[0]->getId();
$username = $instagram->getMediaById( $media_id )->getOwner()->getUsername();

+1

+1

Getting this error while calling this function getAccountById()

PHP Fatal error: Uncaught InstagramScraper\Exception\InstagramException: Respons
e does not JSON

+1

can any one post working example ? or any link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FranciscoG picture FranciscoG  路  6Comments

joty0 picture joty0  路  3Comments

eelcol picture eelcol  路  5Comments

Tvvinman picture Tvvinman  路  7Comments

pauloamorimbr picture pauloamorimbr  路  7Comments