Instagram Insights Issue for latest version of facebook App v18.0
shoyshai opened this issue · comments
metric[0] must be one of the following values: impressions, reach, follower_count, email_contacts, phone_call_clicks, text_message_clicks, get_directions_clicks, website_clicks, profile_views, audience_gender_age, audience_locale, audience_country, audience_city, online_followers, accounts_engaged, total_interactions, likes, comments, shares, saves, replies, engaged_audience_demographics, reached_audience_demographics, follower_demographics, follows_and_unfollows, profile_links_taps
More info?
i am trying to fetch the Instagram insights using the below code but getting the above error as Instagram introdudced updates for instagram insights on September 12, 2023,
$this->fb->get($endpoint.'?metric=audience_city?metric_type=total_value&period=lifetime', $account->token)->getDecodedBody();
Please, read official documentation. https://developers.facebook.com/docs/instagram-api/reference/ig-user/insights
@shoyshai Official bug has been reported here:
https://developers.facebook.com/community/threads/250210891302281/
Use something like this {profileId}/insights/follower_demographics/lifetime?breakdown=gender,age&metric_type=total_value&fields=total_value