Created
December 5, 2022 01:15
-
-
Save ritik1009/79b2fe70b6f8971ddaecaf37fe056fc3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
graph_url = 'https://graph.facebook.com/v15.0/' | |
def post_reel(caption='', media_type ='',share_to_feed='',thumb_offset='',video_url='',access_token = '',instagram_account_id): | |
url = config.graph_url + instagram_account_id + '/media' | |
param = dict() | |
param['access_token'] = access_token | |
param['caption'] = caption | |
param['media_type'] = media_type | |
param['share_to_feed'] = share_to_feed | |
param['thumb_offset'] = thumb_offset | |
param['video_url'] = video_url | |
response = requests.post(url,params = param) | |
print("\n response",response.content) | |
response =response.json() | |
return response | |
############################################ OUTPUT ############################################ | |
{ | |
"id": "17889455560051444" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment