1

我正在尝试使用带有pyfacebook. 所以我在这里查看使用 pyfacebook 更新 Facebook 页面的状态,我认为它不再起作用了。

好吧,最后我解决了这个问题:

#!/usr/bin/python
import facebook
# Replace these with your app's credentials
api_key = 'YOUR_API_KEY'
secret_key = 'YOUR_SECRET_KEY'
client = facebook.Facebook(api_key, secret_key)
client.auth.createToken()
client.login()
print '[*] Please login / give permission application to access you . Then press enter key to continue...',
raw_input()
try:
    client.auth.getSession()
    client.request_extended_permission("publish_stream", popup=False)
    raw_input()   
    cek = client.status.set("Testing update status using facebook API with pyfacebook")
except facebook.FacebookError, e:
    print "ERROR", e    
4

0 回答 0