Answer the question
In order to leave comments, you need to log in
How to make the right request to get information from instagram through facebook?
Task:
Get information about media from Instagram via graph.facebook.com.
https://developers.facebook.com/docs/instagram-api...
I try like this:
$api_host = 'https://graph.facebook.com/user/media';
$access_token_parameters = array(
'client_id' => CLIENT_ID,
'client_secret' => CLIENT_SECRET,
'redirect_uri' => REDIRECT_URI,
'access_token' => $token['access_token'],
'fields' => 'image_url,caption,user_tags,location_id'
);
$jResult = $ins->getAccessTokenUrl($api_host, $access_token_parameters);
$api_host = 'https://graph.facebook.com/11111111111';
$access_token_parameters = array(
'client_id' => CLIENT_ID,
'client_secret' => CLIENT_SECRET,
'redirect_uri' => REDIRECT_URI,
'access_token' => $token['access_token'],
'fields' => 'instagram_business_account'
);
$jResult = $ins->getAccessTokenUrl($api_host, $access_token_parameters);
Answer the question
In order to leave comments, you need to log in
This method only works for pages. Support for personal accounts from Instagram is not currently available.
Please read this https://developers.facebook.com/blog/post/2018/01/...
The point
is that Facebook is gradually tightening the screws on accessing personal data from apps.
In my opinion, applications only need access to the following personal data - FI, gender, mail, profile picture and age.
I understand that it would be nice for any music application like Spotify to have deeper integration, for example, start following an artist on Spotify, automatically subscribe to a Facebook page. In my opinion it is convenient, but some may not like it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question