pyfacebook在那个对象中没有set_status了吗?

时间:2010-09-22 12:35:24

标签: python pyfacebook

我只是试试这个

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')

并得到了这个

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在最新的pyfacebook中删除set_status()函数?

1 个答案:

答案 0 :(得分:1)

从查看source code,看起来你需要使用fb.status.set()