Facebook from the console with fbcmd

As you know, I like to cut to the chase, but first I'll give you a warning: I didn't have class today. (You will see later because I warn you). 🙂

What we are going to do next is see how to connect to our Facebook account through the terminal, so let's get to work.

First we are going to create a folder and enter it.

# mkdir fb # cd fb

Now we follow the following steps.

# sudo apt-get install php5-cli php5-curl # wget https://raw.github.com/dtompkins/fbcmd/master/fbcmd_update.php # php fbcmd_update.php

And now as ROOT we execute

# sudo php fbcmd_update.php sudo # php fbcmd_update.php install

Now we test if it is properly installed

# fbcmd

Now we are going to give permissions to the application in FB

# fbcmd go access

Now we give

# fbcmd go auth


Here we will get a code .. We copy it and paste it in the console as follows.

# fbcmd auth CODE

We add the last permissions

# fbcmd addperm

And ready. now we are going to test things.

How do we use it?

So we look at the album list

# fbcmd albums

The number in brackets [1] is the album ID .. if we are going to upload an image to X album.

#fbcmd addpic rutadelaimagen.jpg  ID comentario

And OLË

If for example we want to post something.

# fbcmd post "Lo que vayas a postear"  (Important the quotes)

fbcmd allows a lot more things. See the posts of others.  #fbcmd stream  and comment or like them ..

There is a BETA version 2 that I have not tried but supposedly lets chat in the fb chat .. You have to look.

For more commands visit http://fbcmd.dtompkins.com/

CHEERS..!!


34 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Luis said

    Awesome! I just tried it and it works perfect.

    Thank you very much for the post and, of course, I share it.

  2.   Adoniz (@ NinjaUrbano1) said

    Will it work for those of us who don't have Facebook? XD

    1.    @Jlcmux said

      No XD

      1.    helena_ryuu said

        LoL

  3.   sieg84 said

    I would use the book just for using this application, but no….

    1.    helena_ryuu said

      idem @ sieg84
      but I find it curious that an application without graphics is used on a site that is primarily dedicated to photography and things like that xDDD

  4.   pennywise911 said

    hahahahaha, how fun is this, thanks.

  5.   elav said

    ┌─ (elav) »{~ / fb}
    └──┤ php fbcmd_update.php install

    fbcmd update utility [version 3.0]
    http://fbcmd.dtompkins.com/update

    … Could not download: [https://raw.github.com/dtompkins/fbcmd/master/fbcmd_update.php]

    1.    @Jlcmux said

      Why don't you install the stable version? Master is like an alpha xD

      1.    elav said

        ¬¬ But the question is, it works for everyone and not for me: '(

        1.    @Jlcmux said

          For ugly. xD Install the stable version.

          1.    elav said

            xDDD I'm going to ban you xDDD

  6.   Hyuuga_Neji said

    I already have another Geek tool to make other coworkers who use Windows xD envy

    Thank you ... you have made my day

  7.   GGGG1234 said

    Jose Luis Cortes Table 😉

    1.    @Jlcmux said

      Yes, you can see it in the photo. and now that? I fear for my safety? 😀

  8.   osdaeg said

    what you are going to post

    fence is close (fenced)

  9.   giskard said

    Interesting article. Pity the spelling mistakes. You have to be more careful with that gentlemen.

    1.    sieg84 said

      attempts against their freedom of expression.

  10.   iCOMECON said

    You should change that ugly thing from "what you are going to post" for "what you are going to post" ... As my teacher would say, it is linguistic terrorism 😛

  11.   Juan said

    Hahaha don't be so hard on spelling mistakes. It is good to highlight them so that they do not commit them more.

    Crazy, I loved the post, thank you so much and I'm going to mess around with this when I can.

    Thank you!

  12.   Luis said

    A couple of doubts:

    - How do I upload a photo to the wall along with a comment?

    - Is it possible to use it to manage multiple accounts?

    1.    @Jlcmux said

      1) fbcmd addpic urldefoto.jpg «comment»
      2) You would have to make a user on your pc for each fb user: / or reconfigure fbcmd every time you are going to use one account or the other. Because it saves your account settings in it

      1.    Luis said

        Too bad you have not contemplated the possibility of managing multiple facebook accounts.

        This program together with a good bash script could give a lot of play.

  13.   Auffer said

    I like this hehehe

  14.   Master said

    I do not find sense to use facebook by command since the fb is opened to mess around and see images of nonsense shared by the other xD, but I hope to use it to see what it feels like.

  15.   Christian Salas said

    It worked perfect for me.
    Thank you. Very interesting.

  16.   Christian Salas said

    Ok here. LOL…

  17.   Ezekiel f. said

    I use archlinux and I have the following error:
    [host (3) host: fbcmd] $ fbcmd
    PHP Warning: require_once (): open_basedir restriction in effect. File (/usr/lib/facebook/facebook.php) is not within the allowed path (s): (/ srv / http /: / home /: / tmp /: / usr / share / pear /: / usr / share / webapps /) in /usr/lib/fbcmd.php on line 534
    PHP Warning: require_once (/usr/lib/facebook/facebook.php): failed to open stream: Operation not permitted in /usr/lib/fbcmd.php on line 534
    PHP Fatal error: require_once (): Failed opening required 'facebook / facebook.php' (include_path = '.: / Usr / share / pear') in /usr/lib/fbcmd.php on line 534

    1.    Ezekiel f. said

      well, it's actually 3 errors ... does anyone know how to solve them? Thank you.

  18.   LiGNUxer said

    Very good but a shit that I do not get the console icon in what I publish on facebook ... I installed it only for the purpose of NERDear and show off my Debian but if the console does not appear in face I don't like it ^ _ ^

  19.   Dear said

    How can I reply to the messages that my friends send me from facebook from the ubuntu terminal?

  20.   Carlos Rojas said

    How would it be to be able to publish on a page and not a profile

  21.   PERSYNC said

    tested 26/02/2015 and everything as is.

  22.   Alexander aldama said

    Can it be used to upload images to a Fanpage ???