tag facebook friends python sdk GraphApi in put_ph

2020-03-31 07:07发布

I would to post pictures and tag with 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})

but i've this error

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

1条回答
【Aperson】
2楼-- · 2020-03-31 07:42

error solved with

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

but tags NOT appear on the facebook wall

查看更多
登录 后发表回答