pyfacebook 在该对象中不再有 set_status 吗?

发布于 2024-09-24 07:40:03 字数 1410 浏览 5 评论 0原文

我只是尝试这个

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

删除会话 2024-10-01 07:40:03

从查看 源代码 看来,您需要使用 fb.status.set()

From looking at the source code, it looks like you need to use fb.status.set()

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文