Skip to content

Instantly share code, notes, and snippets.

@ritik1009
Last active February 24, 2024 09:01
Show Gist options
  • Save ritik1009/f524ff5975f291a8493f044b290cf88e to your computer and use it in GitHub Desktop.
Save ritik1009/f524ff5975f291a8493f044b290cf88e to your computer and use it in GitHub Desktop.
graph_url = 'https://graph.facebook.com/v15.0/'
def publish_container(creation_id = '',access_token = '',instagram_account_id=''):
url = graph_url + instagram_account_id + '/media_publish'
param = dict()
param['access_token'] = access_token
param['creation_id'] = creation_id
response = requests.post(url,params=param)
response = response.json()
return response
################################# OUTPUT #########################################
{
"id": "17920238422030506"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment