I want to get the total of like for a user profile, to do this I'm using this endpoint : https://developers.facebook.com/docs/instagram-api/reference/ig-user/insights#lecture:~:text=GET%20/%7Big%2Duser%2Did%7D/insights
I know this metrics is not available in the documentation but when I call the endpoint with a bad metric, the reponse show metrics available and here is the response:
"message": "(#100) 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, saved, replies, engaged_audience_demographics,
reached_audience_demographics, follower_demographics, follows_and_unfollows, profile_links_taps"
https://graph.facebook.com/{ig-user-id}/insights?access_token={access-token}&metric=bad&period=lifetime
As you can see likes is available. So when I call the endpoint with the metric likes, I get a new error:
"message": "(#100) The following metrics (likes) should be specified with parameter metric_type=total_value"
https://graph.facebook.com/{ig-user-id}/insights?access_token={access-token}&metric=likes&period=lifetime
Then I add the parameter metric_type with value total_value, and I get a new error:
"message": "(#100) Param metric_type on field insights: This param is not valid"
https://graph.facebook.com/{ig-user-id}/insights?access_token={access-token}&metric=likes&period=lifetime&metric_type=total_value
If someone know what i'm doing wrong, it will be a pleasure to get the solution.
Thank's for your responses !