#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Location
    Leeds
    Posts
    2
    Rep Power
    0

    Smile Python to Facebook


    Hi there, I'm a partial beginner who is slightly confused as to how to get python to post a message or a status to my Facebook, I tried taking a similar coding which was linked to twitter and tried to change it to facebook but had no luck

    This is the coding I tried, but no luck:
    def send_to_facebook():
    msg = "I am a message that will be sent to Facebook"
    password_manager = urllib.HTTPPasswordMgr()
    password_manager.add_password("Facebook", "http//facebook.com/", "my e-mail address", "my password")
    http_handler = urllib.HTTPBasicAuthHandler(password_manager)
    page_opener = urllib.build_opener(http_handler)
    urllib.install_opener(page_opener)
    params = urllib.parse.urlencode( {'status': msg} )
    resp = urllib.parse.urlopen("(facebook website)=tn_tnmn", params)
    resp.read()
    I know this is probably completely wrong, bare in mind I haven't really used python before. Suggestions on how to do this would be great thank you.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    30
    Rep Power
    2
    I too am curious about how to interact with Facebook
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    78
    Rep Power
    2
    maybe this library could help you guys out. I would suggest learning more python first though.

    http://facebook-python-library.docs-library.appspot.com/facebook-python/library-manual.html

    Comments on this post

    • EmperorKush agrees
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    30
    Rep Power
    2
    Originally Posted by leonnaley2
    maybe this library could help you guys out. I would suggest learning more python first though.

    http://facebook-python-library.docs-library.appspot.com/facebook-python/library-manual.html
    Thanks for the link
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Location
    Leeds
    Posts
    2
    Rep Power
    0
    Originally Posted by leonnaley2
    maybe this library could help you guys out. I would suggest learning more python first though.
    Thank you

IMN logo majestic logo threadwatch logo seochat tools logo