Skip to content

Instantly share code, notes, and snippets.

@micheleberardi
Created July 12, 2022 19:31
Show Gist options
  • Save micheleberardi/e3d952592c57bae9970fcb9ec5784dc1 to your computer and use it in GitHub Desktop.
Save micheleberardi/e3d952592c57bae9970fcb9ec5784dc1 to your computer and use it in GitHub Desktop.
import requests
def get_url(instagram_media_id,instagram_token):
 url = ""https://graph.facebook.com/v14.0/" + str(instagram_media_id) + "/insights?metric=impressions%2Cengagement%2Creach%2Csaved%2cvideo_views&access_token=" + str(instagram_token)
 r = requests.get(url)
 return r.json()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment