擅长:python、mysql、java
<p>您可以使用facebook提供的<a href="https://facebook-sdk.readthedocs.io/en/latest/api.html" rel="nofollow">Python SDK</a>使用oauth密钥上载照片。<br/>
一旦获得oauth密钥,就可以上载带有<a href="https://facebook-sdk.readthedocs.io/en/latest/api.html#put-object" rel="nofollow">GraphAPI.put_object()</a>的图片:</p>
<pre><code>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()
</code></pre>