您可以使用facebook提供的Python SDK通过oauth密钥上传照片。
获得oauth密钥后,可以使用GraphAPI.put_object()上传图片:
graph = facebook.GraphAPI(oauth_access_token)
photo = open("picture.jpg", "rb")
graph.put_object("me", "photos", message="You can put a caption here", source=photo.read())
photo.close()
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6284 次 |
| 最近记录: |