好吧,所以我google了一下,我在stackoverflow上找到了线程,我已经检查了官方的Facebook wiki和..什么不是..
我现在希望你们其中一个人坐在用于Python的Facebook API示例代码上.这就是我到目前为止所得到的只是通过PyFacebook的"无效签名",这似乎是一个死的项目:
from facebook import Facebook
api_key = '123456789______'
secret = '<proper secret key>'
OTK = 'XXXXX' # <-- You get this from: https://www.facebook.com/code_gen.php?v=1.0&api_key=123456789______
long_term_key = None
fb = Facebook(api_key, secret)
def generate_session_from_onetime_code(fb, code):
fb.auth_token = code
return fb.auth.getSession()
if not long_term_key:
long_term_key = generate_session_from_onetime_code(fb, OTK)['session_key']
print 'Replace None with this in the .py file for long_term_key:'
print long_term_key
fb.session_key = long_term_key
fb.uid = 000000001 # <-- Your user-id
fb.signature = api_key # <-- This doesn't work at …Run Code Online (Sandbox Code Playgroud)