【发布时间】:2018-10-14 05:21:09
【问题描述】:
我尝试制作一个可以自动发到Facebook墙上的脚本,这个:
import facebook
graph = facebook.GraphAPI(access_token='...')
attachment = {
'name': 'Link name',
'link': 'http://www.example.com/',
'caption': 'Check out this example',
'description': 'This is a longer description of the attachment',
'picture': 'https://upload.wikimedia.org/wikipedia/commons/c/c4/Michelangelo_Merisi_da_Caravaggio_-_Medusa.png',
}
graph.put_wall_post(message='Check this out...', attachment=attachment)
可惜给我这个错误,不知道问题出在哪里……
`AttributeError: 'GraphAPI' object has no attribute 'put_wall_post'
【问题讨论】:
-
您的问题的答案在错误消息中。
GraphAPI对象没有名为put_wall_post的方法。您使用的是哪个版本的 SDK? -
我有 V 2.0.0
标签: python facebook facebook-graph-api bots