【发布时间】:2009-11-22 06:20:14
【问题描述】:
通过 Facebook Connect FBML 按钮登录后,是否可以通过 PyFacebook 检索和使用会话详细信息?我可以像通过 Python 触发登录一样使用 auth.getSession() 吗?
基本上,我正在尝试确定是否可以在下面的示例中替换包含 raw_input() 的阶段:
import facebook
API_KEY = 'xxx'
SECRET_KEY = 'xxx'
facebook = facebook.Facebook(API_KEY, SECRET_KEY)
facebook.auth.createToken()
facebook.login()
# Login to the window, then press enter
print 'After logging in, press enter...'
raw_input()
# This is where FBML button should get me
facebook.auth.getSession()
print 'Session Key: ', facebook.session_key
print 'Your UID: ', facebook.uid
【问题讨论】:
-
没有关于问题或答案的具体 Django 或 Zope,所以我为你删除了这些标签。