python-3.x - 在 Python 错误中通过 Instagram Graph api 发表评论
问题描述
我正在使用以下 python 代码尝试向 Instagram 媒体帖子发表评论。我收到错误:
post_id ='nnnnnnnnnnnnn'
params = dict()
params['message'] = 'This is a comment from code'
params['access_token'] = 'xxxxxxxxxxxxx'
url = 'https://graph.facebook.com/v6.0/'+post_id+'/comments?'
resp = requests.post(url,params)
这是传入的 post_id 为 'nnnnnnnn' 的错误:
'{"error":{"message":"不支持的发布请求。ID为' nnnnnnnnnn '的对象不存在,由于缺少权限而无法加载,或者不支持此操作。请阅读https上的Graph API文档: \/\/developers.facebook.com\/docs\/graph-api","type":"GraphMethodException","code":100,"error_subcode":33,"fbtrace_id":"ADoNTClMQwRIi8LEXpkfMr2"}}'
解决方案
推荐阅读
- java - 在 java 中使用 .equals 方法时出现空指针异常
- angular - Angular8 ReactiveForms:在不同的FormGroup中具有相同名称的单选按钮输入?
- sql - 获取字段值过时的连续天数
- git - 提交注释以显示代码中所做的更改
- apache-kafka - 是否有一个选项可以为特定主题而不是全部配置 num 流线程?
- r - 创建具有不同行数的新 R 列到 df
- docker - 如何将 docker 镜像从 localhost docker 私有注册表拉到 GKE?
- ruby-on-rails - 如何为rails中的特定操作设置带有自定义域的自定义url
- azure - 使用托管标识从逻辑应用调用受 Azure AD 保护的 API
- excel - 从多维度数组中删除行