-
Notifications
You must be signed in to change notification settings - Fork 30
IG User
Justin Stolpe edited this page Oct 6, 2022
·
8 revisions
Get info and pages for a user.
Get the users profile info.
use Instagram\User\User;
$config = array( // instantiation config params
'user_id' => '<USER_ID>',
'access_token' => '<ACCESS_TOKEN>',
);
// instantiate user for use
$user = new User( $config );
// get user info
$userInfo = $user->getSelf();
Get the facebook pages connected to the user.
use Instagram\User\User;
$config = array( // instantiation config params
'access_token' => '<ACCESS_TOKEN>',
);
// instantiate and get the users info
$user = new User( $config );
// get the users pages
$pages = $user->getUserPages();