No challenge is too great for me. I love nothing more than to fix a huge mess of bad code and make it perfect.
  • How to tweet from @AlfredApp

    So, quick post about how to tweet from AlfredApp using a Powerpack feature.

    First of all, you need access the Alfred Preferences panel and you will need a licence for the Powerpack - of course. You will also need a Ruby gem called console_tweet. 

    Open your terminal app, in my case is iTerm, and install this gem:

    gem install console_tweet

    And now you need configure your account:

    twitter setup

    Follow the instructions and enter the PIN generated on Twitter site and everything will be fine. If you are using RVM, please use the system Ruby installed to make it work.

    Test it, and see if works:

    twitter tweet "Thanks @daviscabral, now I know how to tweet from console!"

    The last versions of AlfredApp came with a nice terminal integration, that is what we will be using now that we already have our console twitter client working.

    Inside the panel, access the “System -> Terminal / Shell” tab. This tab will allow you to pick the terminal application that you prefer, in my case I use the iTerm2, but pick one of your choice.

    The ‘Prefix’ param here is not used by us to tweet. It is used for shell commands inside the Alfred textbox, like the image below (that will run that command on iTerm - even saying that is in Terminal).

    Add a new Shortcut clicking on the “plus icon”:

    Fill the “Title” and “Description” with what you think it’s ok to describe this. I’m using the keyword “tweet”. The only piece that shouldn’t be changed is the “Command”, that needs to be:

    twitter tweet "{query}"

    Remember of mark the checkbox “Quotes”. This will allow you to use quotes (“) in your tweets.

    That’s it guys.

    UPDATE: I’ve got it working again. You can check the last post about it here.

    UPDATE 2: You need Xcode or GCC installed to be able to install this gem.

    1. macsnider reblogged this from daviscabral
    2. alfredtips reblogged this from daviscabral
    3. michaelthegeek reblogged this from daviscabral
    4. daviscabral posted this