I try to get the next metrics of each of my posts in my page in a specific range of date, the metrics I need are: date, URL from the post, message from the post, likes, number of comments, number of shares, clicks to links, others click, views, negative clicks, reach organic and paid.
I already have date, URL, message, likes, number of comments, and number of shares. With this call:
url = "https://graph.facebook.com/{page-ID}/feed?fields=message,comments.summary(true),reactions.limit(1).summary(true),shares&since=" + start_date + "&until=" + end_date + "&access_token=" + access_token
Does anyone know how to get the rest?: clicks to links, others clicks, views, negative clicks, reach organic and paid.
I tried with the next call but only gave me general impressions.
url = "https://graph.facebook.com/{page-ID}/insights?metric=post_impressions,post_impressions_paid&since=" + start_date + "&until=" + end_date + "&access_token=" + access_token
For the people in the future who wants this information
I'm using 15.0v of the API
The lenguaje is python and start_date, end_date and access_token, are variables.
In start_date and end_date need to be "Unix time" in str format (example for jaunary 1 of 2023: start_date = "1672552800")
In my app have the next permissions:
- read_insights
- pages_show_list
- ads_management
- ads_read
- pages_read_engagement
- pages_read_user_content
- public_profile