To get an Facebook Page’s Instagram Business Account with the Instagram Graph API PHP SDK, you have to use the users access token and make a request to the pages endpoint on the Instagram graph API.
Get User Facebook Pages
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();
And that is all you need to do! The Instagram Graph API PHP SDK takes care of all the heavy lifting for you! I know the Instagram Graph API can be a bit confusing and so I hope this makes dealing with it a bit easier! Well, that is going to do it for this post! Leave any comments/questions below and thanks for stopping by the blog!
Links