Trick anyone by accessing facebook from command line. There exists a command line utility fbcmdthrough which you can access your facebook accounts. Obviously, you need to have PHP installed on your system for this utility to work. Once PHP is installed, download the script from here or here.
Once done, now run the script.
This is what I got when I executed the script :
$ ./fbcmd_update.php fbcmd update utility [version 3.0] http://fbcmd.dtompkins.com/update Preference file: [/home/mylinuxbook/.fbcmd/ prefs.php] Software development branch: [master] Software library destination: [/usr/local/lib/fbcmd/] Copy script to bin dir?: [Yes] Bin dir location: [/usr/local/bin/] Script name: [fbcmd] Auto-restart when necessary: [Yes] Welcome! This appears to be the first time running fbcmd_update. To change any of the above settings, modify your preferences file To change your preferences file location, set an FBCMD environment var. Otherwise, The above default settings are fine for most users To finish the installation: $ sudo php fbcmd_update.php sudo $ php fbcmd_update.php
Look at the last paragraph, it asks to execute these two commands to complete the installation. This is what I got when I executed these two commands :
$ sudo php fbcmd_update.php sudo fbcmd update utility [version 3.0] http://fbcmd.dtompkins.com/update $ php fbcmd_update.php fbcmd update utility [version 3.0] http://fbcmd.dtompkins.com/ update ..................... Update: COMPLETE! fbcmd version: [none] --> [1.1] Note: fbcmd_update.php is now at [/usr/local/lib/fbcmd/fbcmd_ update.php] so you can remove the old one at [/home/mylinuxbook/Desktop/ fbcmd_update.php] type fbcmd to begin
Installation is completed. Now, this is what I did :
$ fbcmd Welcome to fbcmd! [version 1.1] This application needs to be authorized to access your facebook account. Step 1: Allow basic (initial) access to your acount via this url: https://www.facebook.com/dialog/oauth?client_id= 42463270450&redirect_uri=http: //www.facebook.com/connect/ login_success.html to launch this page, execute: fbcmd go access Step 2: Generate an offline authorization code at this url: http://www.facebook.com/code_ gen.php?v=1.0&api_key= 42463270450 to launch this page, execute: fbcmd go auth obtain your authorization code (XXXXXX) and then execute: fbcmd auth XXXXXX
Then I typed the command :
$ fbcmd go access
This command opened facebook.com in my web browser and after logging in, this is what I got :
Once I pressed okay, I was redirected to a URL which said that this URL is your password.
I saved the URL and then executed the following command :
$ fbcmd go auth
and the following page opened :
Hitting the generate button generated a code that is needed by the command line application. Then I executed the following command :
$ fbcmd auth [my-code]
and here what was displayed in output :
fbcmd [v1.1] AUTH Code accepted. Welcome to FBCMD, Himanshu Arora! most FBCMD commands require additional permissions. to grant default permissions, execute: fbcmd addperm
So, seems like fbcmd is all set to run. Here is how I updated my status through this command line utility :
$ fbcmd FEED1 "Accessing facebook from Linux command line. "
So, I used FEED1 command of fbcmd utility post a message. I confirmed it on my facebook page :
Here you go. A facebook post now is as easy as running a ‘ls’ command on prompt. Through this utility you can do a lot of facebook stuff. Visit this page for complete list of commands.
No comments:
Post a Comment