我有三张图片image1.jpg,image2.jpg,image3.jpg,我正在尝试将它们作为一个单独的上传下面的帖子我的代码是:
import facebook
graph = facebook.GraphAPI(oauth_access_token)
profile = graph.get_object("me")
friends = graph.get_connections("me", "friends")
file1 = open("image1","rb")
file2 = open('image2', 'rb')
graph.put_photo(file1, 'Look at this cool photo!')
graph.put_photo(file2, 'Look at this cool photo!')
但是他们被上传为单独的帖子图像。怎么我在一个帖子里上传多个图片吗?在
你试过了吗:put-wall-post。。或
put-object
put-wall-post
可能是您要查找的内容:来源:http://facebook-sdk.readthedocs.io/en/latest/api.html#api-reference
试试这个。首先,你必须上传所有照片并保留id(imgs_id)。在
然后,生成一个类似args的dict,最后调用request方法。在
对不起,如果不是最好的压缩代码。。。在
相关问题 更多 >
编程相关推荐