Virtually everyone, especially in first world countries, is on Facebook. Friends, events, pictures, and plenty more are all commonly found on Facebook unlike any other location. However, an ultimate geek may not want to use Facebook like everyone else — namely via their website.
Certain geeks are very familiar with the Linux command line. If you’ve a newbie, you can check out our ultimate guide to Linux to learn more. Anyone into the Linux command line will love using the command line to access the Facebook social network. This sounds like an impossible feat, but a PHP script is making it all possible.
fbcmd is a simple PHP script (well, simple when compared to the actual Facebook website) which allows you to perform actions on Facebook via the script, as if the script were a natively installed application. You can then pass commands to the program, as well as any other flags or optional information as you’re used to from most other command-line programs.
To use the script, you’ll need to make sure that you have some PHP modules installed. Under Ubuntu, you can install them by issuing the command
sudo apt-get install php5-cli php5-curl. Other Linux distributions should have similar commands with similar package names. Once those modules are installed, you can download fbcmd from this link here (right click it and choose Save As) or by issuing the command
wget https://raw.github.com/dtompkins/fbcmd/master/fbcmd_update.php. Once that file is downloaded, go ahead and run
sudo php fbcmd_update.php install.
Using fbcmd requires that you’re authenticated with Facebook, but fbcmd doesn’t use traditional login credentials. Instead, you’ll need to go through a setup process to get going. First, run
fbcmd and you’ll see some instructions printed into the terminal on getting started. First type
fbcmd go access to open up a connection to Facebook, then
fbcmd go auth to launch a browser with an authentication code based on your Facebook account.
fbcmd auth [code], replacing [code] with the actual generated code. You can then add permissions for fbcmd using
fbcmd addperm, and check permissions using
Now that you’re finally set up, it’s time to do some things with fbcmd. To post a new status, use
fbcmd status [message]. If you’d like to see the posts others have made on your wall, use
fbcmd friends returns a list of all your friends, but you can also search for specific friends by using
fbcmd friends "[string]" (remove the square brackets but include the quotation marks). To see who’s currently online, use
fbcmd fonline. You can show the last x amount of messages in your inbox by using
fbcmd inbox X, of course replacing the X with a number. To check out your news feed, using
fbcmd stream, and like a post using
fbcmd like [post ID]. To upload a picture to Facebook, use
fbcmd addpic [path of image] [optional album ID] [optional tag].
All in all, it’s pretty cool to be able to do all this with Facebook directly from the command line. Of course, this method of accessing Facebook isn’t for everyone, and is more for the big-time geeks or for showing off. So use this if you dare, but it’s pretty cool once it’s successful.
How cool is using Facebook over a command line to you? What would be your favorite way to access Facebook? Let us know in the comments!
Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.