Facebook via Command Line Interface
Ever wondered whether you can access Facebook via command line? Is there any command line interface (CLI) available for those people who like to stick with terminal window? The answer is fbcmd.
fbcmd is command line application available for Linux flavours as well as Windows. I admit, accessing Facebook through browser window or mobile devices is a lot easier. but, what’s the typical use-case of fbcmd is- you can now schedule your status updates to be published at particular time with help of cron jobs. Sounds cool..isn’t it?
Installation and use is very simple for those who love to fire commands in their terminals.
You must have PHP5 installed on your system to install fbcmd. To check whether PHP is already installed on your computer type “php -v” in terminal. If installed, the output will be the version installed on your computer else use the command below to install PHP.
If Linux flavour is Ubuntu,
sudo apt-get install php5
If you are using centos,
yum install php5 php-cli
Obtain the fbcmd_udpate.php program by executing:
curl -O https://github.com/dtompkins/fbcmd/raw/master/fbcmd_update.php
Execute the following two commands:
curl -O https://raw.github.com/dtompkins/fbcmd/master/fbcmd_update.php
sudo php fbcmd_update.php
sudo php fbcmd_update.php install
1. Try the command:
The output should be-
Welcome to fbcmd! [version 1.0-beta5-dev1]
This application needs to be authorized to access your Facebook account.
You are almost done! This application needs to be authorized to access your Facebook account. This is a one time process.
2. Allow basic (initial) access to your account via this URL:
fbcmd go access
3. Generate an offline authorization code
fbcmd go auth
4. Obtain your authorization code (XXXXXX)
fbcmd auth XXXXXX
5. Grant additional permissions to fbcmd
To get syntax of any command in fbcmd use-
Set your status update
fbcmd status “Accessing FB through console”
Get your profile ID
Fetch (and optionally save) profile pics of all the friends
fbcmd ppics =all /tmp/fbcmd/ppics/
Export all your friend’s B’day date in csv format
fbcmd finfo birthday_date -csv
Get list any friends who are currently online
There are many other commands available, all of them are listed on fbcmd wiki page.
Like this article or have something to say? Comment it down