Update Facebook Page's status using pyfacebook

Posted by thornomad on Stack Overflow See other posts from Stack Overflow or by thornomad
Published on 2009-12-15T14:00:59Z Indexed on 2011/01/06 8:54 UTC
Read the original article Hit count: 227

Filed under:
|
|
|

I am attempting to add functionality to my Django app: when a new post is approved, I want to update the corresponding Facebook Page's status with a message and a link to the post automatically. Basic status update.

I have downloaded and installed pyfacebook - and I have read through the tutorial from Facebook. I have also seen this suggestion here on SO:

import facebook
fb = facebook.Facebook('YOUR_API_KEY', 'YOUR_SECRET_KEY')
fb.auth.createToken()
fb.login() # THIS IS AS FAR AS I CAN GET
fb.auth.getSession()
fb.set_status('Checking out StackOverFlow.com')

When I get to the login() call, however, pyfacebook tries to open lynx so I can login to Facebook 'via the web' -- this is, obviously, not going to work for me because the system is supposed to be automated ... I've been looking, but can't find out how I can keep this all working with the script and not having to login via a web browser.

Any ideas?

© Stack Overflow or respective owner

Related posts about python

Related posts about django