2

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 !

ag7-alexis
  • 83
  • 2
  • 6
  • Hi! Did you manage to get the right api call? I'm struggling too and Facebook hasn't documented it yet – Barbi Oct 03 '22 at 15:51
  • @Barbi Hi, nop I didn't found the solution ='( – ag7-alexis Oct 04 '22 at 11:17
  • Oh ok, thank you for the reply in any case. Maybe they're rolling out this feature and will let us know soon..... Even though FB's timing isn't so fast, usually – Barbi Oct 05 '22 at 08:30

0 Answers0