Fbcmd: Use Facebook using terminal (Ubuntu)
Installing required componentsFbcmd created with PHP programming language, so we need PHP interpreter to run this application:
root@penreturns:~$ sudo apt-get install php5 php5-cliCheck whether everything is installed correctly by typing the following command:
root@penreturns:~$ php -r "echo phpversion();"Now, please make sure that PHP is configured correctly, especially "allow_url_fopen" variable in php.ini must be set to "On".
root@penreturns:~$ cat /etc/php5/cli/php.ini | grep allow_url
If the value of "allow_url_fopen" is still "Off" set it to "On"!
Installing Fbcmd
Please download Fbcmd zipped package here, then type the following commands to install it:
root@penreturns:~$ unzip fbcmd.zipIt needs some times to install because it will search for update on the Internet. Once installed, please type "fbcmd" on Terminal the check wheter Fbcmd is installed correctly.
root@penreturns:~$ cd fbcmd
root@penreturns:~$ sudo php fbcmd_update.php
root@penreturns:~$ sudo php fbcmd_update.php install
One-Time Configuration
The purpose of this step is to gain access to your Facebook account, so please be patient if there will a lot of commands to run. Don't worry, you should run this step only once!
Please make sure, you have logged into your Facebook account:
root@penreturns:~$ fbcmd go accessA window of web browser will be opened and you will be prompted to give "initial" permission to Fbcmd accessing your account (for Auth Code generation process). Now, Fbcmd needs to generate Auth Code (or One-time code) from your account, simply type the following command:
root@penreturns:~$ fbcmd go authA web browser window will be opened again and you need to "Generate" one-time code which will be entered to Fbcmd application in order to gain "full" access to your Facebook account. Please, generate the code and remember, copy, or save the unique code.
Once, One-time code successfully generated, run this command to enter it to the application:
root@penreturns:~$ fbcmd auth XXXXXXReplace "XXXXXX" with your unique code. There is one more step to give Fbcmd "full" access to your Facebook account:
root@penreturns:~$ fbcmd addpermYou've done! Now you can use Fbcmd as you wish. I'll give an example on how to post status update using Fbcmd:
root@penreturns:~$ fbcmd status "This is a test status update using Fbcmd"There are still a lot of commands of Fbcmd, you can read all of them including the examples here.
Source
*copy code without root@penreturns:~$
Reply to this post
Post a Comment