pyfacebook 在该对象中不再有 set_status 吗?
我只是尝试这个
import facebook
fb = facebook.Facebook('YOUR_API_KEY', 'YOUR_SECRET_KEY')
fb.auth.createToken()
fb.login()
fb.auth.getSession()
fb.set_status('Checking out StackOverFlow.com')
并在最新的 pyfacebook 中得到了这个
gunslinger@c0debreaker:~$ python Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) [GCC 4.3.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.
>>> import facebook
>>> fb = facebook.Facebook('MY_API_KEY', 'MY_SECRET_KEY')
>>> fb.auth.createToken() u'SECRET'
>>> fb.login()
>>> fb.auth.getSession() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "build/bdist.linux-i686/egg/facebook/__init__.py", line 670, in getSession
File "build/bdist.linux-i686/egg/facebook/__init__.py", line 1123, in __call__
File "build/bdist.linux-i686/egg/facebook/__init__.py", line 1056, in _parse_response
File "build/bdist.linux-i686/egg/facebook/__init__.py", line 1007, in _check_error
facebook.FacebookError: Error 100: Invalid parameter
>>> fb.set_status('Checking out StackOverFlow.com') Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'Facebook' object has no attribute 'set_status'
>>>
pyfacebook 删除 set_status() 函数?
i just try this
import facebook
fb = facebook.Facebook('YOUR_API_KEY', 'YOUR_SECRET_KEY')
fb.auth.createToken()
fb.login()
fb.auth.getSession()
fb.set_status('Checking out StackOverFlow.com')
and got this
gunslinger@c0debreaker:~$ python Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) [GCC 4.3.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.
>>> import facebook
>>> fb = facebook.Facebook('MY_API_KEY', 'MY_SECRET_KEY')
>>> fb.auth.createToken() u'SECRET'
>>> fb.login()
>>> fb.auth.getSession() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "build/bdist.linux-i686/egg/facebook/__init__.py", line 670, in getSession
File "build/bdist.linux-i686/egg/facebook/__init__.py", line 1123, in __call__
File "build/bdist.linux-i686/egg/facebook/__init__.py", line 1056, in _parse_response
File "build/bdist.linux-i686/egg/facebook/__init__.py", line 1007, in _check_error
facebook.FacebookError: Error 100: Invalid parameter
>>> fb.set_status('Checking out StackOverFlow.com') Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'Facebook' object has no attribute 'set_status'
>>>
pyfacebook remove set_status() function in newest pyfacebook ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从查看 源代码 看来,您需要使用 fb.status.set()
From looking at the source code, it looks like you need to use fb.status.set()