我试着把自己作为一个测试,但它不起作用。有人能帮忙吗?
api.update_status(api.get_user(myaccountusername))
您需要定义提及(使用用户screen_name)作为tweet的一部分
api.update_status(f'@user1 @user2 check this out')
对api.get_user(myaccountusername)
的调用返回完整的User对象
User(_api=<tweepy.api.API object at 0x101cb39a0>, _json={'id': 3300744875,
'id_str': '3300744875', 'name': 'Beppe Catanese', 'screen_name':
'beppecatanese', 'location': 'Amsterdam, The Netherlands', 'profile_location':
None, 'description':
etc..
etc...