Created
December 8, 2022 02:11
-
-
Save ritik1009/7f6921e6777632f120277ac178b08c76 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_video(video_url='',caption='',instagram_account_id='',access_token=''): | |
url = graph_url + instagram_account_id + '/media' | |
param = dict() | |
param['access_token'] = access_token | |
param['caption'] = caption | |
param['video_url'] = video_url | |
param['media_type'] = 'VIDEO' | |
param['thumb_offset'] = '10' | |
response = requests.post(url, params=param) | |
response = response.json() | |
return response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment