Home > Code > Gwibber is…

Gwibber is…

Just had a minor annoyance this morning, trying to post a status with gwibber this morning. I was dual-posting to Twitter and Facebook. On Twitter, the post read, simply enough:

DC Tweed Ride 2010. I need to step up my game: http://readysetdc.com/2010/11/video-dc-tweed-ride-2010/

On Facebook, however, Gwibber felt the need to add the word “is” to the beginning of my post. “Cliff Dyer is DC Tweed Ride 2010” makes no sense whatsoever.

I figured Gwibber is python, so it should be pretty easy to patch it not to post the word “is” when it posts to Facebook. Sure enough, in gwibber.microblog.facebook.Client.send(), there is an argument, status_includes_verb, which is set to False (line 403). Apparently, if you tell Facebook you don’t have a verb, it gives you one.

I changed it to status_includes_verb=True, and now my statuses show up exactly how I want them to. All I have to do now to get my status to start with the word “is” is (are you ready for it?) type “is.”

It was a nice reminder why it’s working with open source software is so great. Thanks Linus for starting this whole Linux thing. Thanks RMS for fighting for free software even when we wish you would just relax. Thanks to the Gwibber developers, Ryan, Ken, Dominic, Alexander, Greg, and Fabien. Thanks all you contributers of code and documentation.

P.S. The DC Tweed Ride looks awesome.

Advertisements
Categories: Code
  1. Kermi
    2010/12/06 at 10:04 pm

    OMG.. Please.. I beg you.. tell me what that file name is! I am so frustrated with gwibber making me sound grammatically stupid!

    Thanks for figuring out how to fix it!

  2. Hsehdar
    2010/12/06 at 11:30 pm

    Easy to be done post. It worked for me.

    For people who don’t know…
    1. File is /usr/share/pyshared/gwibber/microblog/facebook.py
    2. Make changes as in this post
    3. Kill Gwibber Service and start again

    Thank you Cliff Dyer.

  3. Cliff Dyer
    2010/12/07 at 7:25 am

    Thanks for the feedback. I’m glad this was helpful for somebody other than me. For reference, the way I found the file was to run which gwibber from the command line, which told me that the binary is /usr/bin/gwibber. Then, looking in /usr/bin/gwibber, I see that the import is called gwibber. So I fired up a python interpreter and typed:

        >>> import gwibber
        >>> print gwibber.__path__
        /usr/share/pyshared/gwibber/__init__.py

    So I started looking in /usr/share/pyshared/gwibber for facebook specific stuff, since I knew the problem was only occurring there.

    Happy hacking!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: