Skip to content

Instantly share code, notes, and snippets.

@micheleberardi
Created July 12, 2022 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save micheleberardi/ed1418d886f7e1707cfa943822d27645 to your computer and use it in GitHub Desktop.
Save micheleberardi/ed1418d886f7e1707cfa943822d27645 to your computer and use it in GitHub Desktop.
GET IG MEDIA LIST
import requests
def get_url(instagram_profile_id,instagram_token):
url = "https://graph.facebook.com/v14.0/"+str(instagram_profile_id)+"/media?fields=id%2Ccaption%2Cis_comment_enabled%2Ccomments_count%2Clike_count%2Cmedia_type%2Cmedia_url%2Cpermalink&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