Before you Begin

  • You will need to have PHP installed on your machine. (It's free!)
  • It will also have to be in your path.
  • For Mac/Linux, it may be already installed.
    • For Linux debian-based intros, run:
      sudo apt-get install php5-cli php5-curl
  • For Windows, see how To install PHP in Windows
  • To test your PHP environment, try typing at a command prompt:
  • php -r "echo phpversion();"
  • While you're at it, make sure each of the following output "1".  If not, visit troubleshooting.
    php -r "echo ini_get('allow_url_fopen');"
    php -r "echo 
    php -r "echo function_exists('json_decode');"
Installation Options

Windows automated .msi Installation

  • Make sure you have PHP installed before you run the installation. (see how to install PHP in Windows)
  • Visit the Downloads page and execute the .msi Installation program
  • There have been reports that you may have to reboot before fbcmd is in your path

    Mac/Linux (and Windows too)

    • Obtain the fbcmd_udpate.php program from (this link) (or download it from the Downloads page) or execute:
      or if that doesn't work,
      curl -O 
      or if that doesn't work, obtain the file from this link
    • Windows users: put this file where you want the software to be installed.
    • Execute the following command to initialize the installation:
      php fbcmd_update.php
      It should display all of the installation settings, including where it will install.
    • You can customize these settings by modifying your preference file (it should have told you where it is)
    • Note that it will install the software (library) to one location (eg: /usr/local/lib/fbcmd), and then add a script to another location (eg: /usr/local/bin) which should be in your path.
    • If you have SUDO access, you can execute the command:
      sudo php fbcmd_update.php sudo 
      If you do NOT have sudo access, you should modify your preference file to change the destination directories.
    • Finally, to complete the installation, execute: 
      php fbcmd_update.php install

    Step One: Initial Test

    • Try the command:
    • It should say you're not authorized.
    • (Mac/Linux) if it says command not found, try typing bash to restart your shell.  If that doesn't work check to see if /usr/local/bin is in your PATH: see how to add fbcmd to your PATH.

    Step Two: Grant Basic Access

    • Before you can obtain an authorization code, you need to grant FBCMD basic access to your Facebook account.
    • Type
      fbcmd go access
      or visit 
      this website to grant basic access.
    • NOTE: some people have reported that they need to visit the app page to grant basic access.

    Step Three: Obtain & Enter Authorization Code

    • After you've allowed basic access, you need to grant FBCMD authorization to use your Facebook account in offline mode.
    • This authorization is performed only once at installation: FBCMD stores your authentication information in your data directory for future use.
    • Type 
      fbcmd go auth
      which should take you to this website to get an AUTH code (we'll call it XXXXXX)
    • Run the command:
      fbcmd auth XXXXXX
      and you should hopefully get a success message.
    • Note: AUTH codes are time-sensitive and can only be used once. If one fails, visit the website and generate another

    Step Three: Obtain Additional Authorization

    • To execute most commands in FBCMD, you need to grant additional permissions:
    • To grant FBCMD the default permissions, type:
      fbcmd addperm
      which should launch a browser to prompt you for further authorization
    • Note: granting permissions does NOT allow other FBCMD users to access your personal information:
      These permissions are linked to your account and your authorization you obtained code above.
    • you can see what permissions have been granted with the SHOWPERM command.

    Step Four: Test your authorization (version 2.0 +)

    • Type the command:
      fbcmd test
      which will make sure you have installed everything ok.

    Congratulations! You've installed FBCMD.
    You should check out the additional installation notes below, and then visit the Syntax page and the Commands page to see what you can do.