繁体   English   中英

在put_photo中标记facebook朋友python sdk GraphApi

[英]tag facebook friends python sdk GraphApi in put_photo

我会发布图片并用Frieds标签。

graph = facebook.GraphAPI(self.cfg['access_token'])
tags = [{"tag_uid": "1234567890", "x": 0, "y": 0}, {"tag_uid": "0001234567890", "x": 0, "y": 0}]
graph.put_photo(image=open(str(file), 'rb'), message='Pictures test', **{'tags': tags})

但是我有这个错误

facebook.GraphAPIError: (#100) param tags must be an array.

错误解决

tags = [{"tag_uid": "1234567890", "x": 0, "y": 0}]
graph.put_photo(image=open(str(file), 'rb'), message='Pictures test', **{'tags[0]': tags})

但标签未显示在Facebook墙上

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM