Skip to content

Instantly share code, notes, and snippets.

@ritik1009
Created December 3, 2022 14:24
Show Gist options
  • Save ritik1009/c43a95f99c1f6b2d1f41d8d8ae098861 to your computer and use it in GitHub Desktop.
Save ritik1009/c43a95f99c1f6b2d1f41d8d8ae098861 to your computer and use it in GitHub Desktop.
graph_url = 'https://graph.facebook.com/v15.0/'
def get_comment(comment = '',access_token='',media_data=''):
media_id = media_data['data'][-1]['id']
url = graph_url + media_id +'/comments'
param = dict()
param['message'] = comment
param['access_token'] = access_token
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