如何通过 Instagram Graph 标记用户 API - Python

How to tag users via Instagram Graph API - Python

我希望在通过 Instagram Graph 发布媒体时标记用户 API。

我已经能够成功发布照片和视频,但无法标记用户。

这就是我正在尝试的:

params = getCreds()  # get creds from defines
params['media_type'] = 'IMAGE'  # type of asset
params['media_url'] = 'path to my image'  # url 
params['caption'] = 'My Caption'
params['user_tags'] = ('kevinhart4real',0.5, 0.8)
imageMediaObjectResponse = createMediaObject(params)  # create a media object

我要标记的人是 Kevinhart4real,我想将标记放在 XY 坐标 (.5,.8)

我一直在关注 this 教程

我用过这个:

params['user_tags'] = '''   [
 {
   username:'kevinhart4real',
   x: 0.5,
   y: 0.8
 }
   ]
   '''

别忘了将其添加到容器中:

endpointParams['user_tags'] = params['user_tags']