3f/facebook-od

Facebook Open Graph Object Debugger CLI.

1.0.1 2017-11-29 14:35 UTC

This package is not auto-updated.

Last update: 2024-12-22 04:11:52 UTC


README

Latest Stable Version Latest Unstable Version Build Status Scrutinizer Code Quality License Total Downloads

Facebook Object Debugger CLI

The Facebook Object Debugger CLI is command-line interface used to refresh the information of any page shared on Facebook. Unfortunately this operation can be done manually using the Facebook Open Graph Object Debugger. To overcome this limitation I have created this command-line interface, using the official Facebook SDK for PHP.

Composer Installation

To install Facebook Object Debugger CLI, you first need to install Composer, a Package Manager for PHP, following those few steps:

curl -s https://getcomposer.org/installer | php

You can run this command to easily access composer from anywhere on your system:

sudo mv composer.phar /usr/local/bin/composer

Facebook Object Debugger CLI Installation

Once you have installed Composer, it's easy install Facebook Object Debugger CLI.

  1. Move into the directory where you prefer install Facebook Object Debugger CLI:
cd /usr/local
  1. Create a project for Facebook Object Debugger CLI:
sudo composer create-project 3f/facebook-od
  1. For your convenience create a symbolic link for the fbod executable in your /usr/local/bin directory:
sudo ln -s /user/local/facebook-od/bin/fbod.php /usr/local/bin/fbod

Supported Commands

Lists commands.

fbod list [--xml] [--raw] [--format="..."] [namespace]

Displays help for a command.

fbod help [--xml] [--format="..."] [--raw] [command_name]

Fetches new scrape information and update the Facebook cache.

fbod refresh [-i|--file[="..."]] [-u|--url[="..."]] 
  [-d|--id[="..."]] [-s|--secret[="..."]] [-t|--token[="..."]] 
  [-e|--encode]

Usage

Using the Facebook Object Debugger CLI is really simple. You can refresh a single URL or a bunch of URLs providing a text file with a list of URLs, one for each line.

fbod refresh -u http://www.example.com/foo-bar-123
fbod refresh -i urls.txt

You must also provide an App ID, an App Secret and an App Access Token or a User Access Token. To see your token please use the Access Token Tool. You can use both the App Access Token or the User Access Token, just keep in mind the first one does not expire. For your convenience you can rename (or copy) the config.default.ini to config.ini, then replace the values for your application. Otherwise you can provide those parameters using the designed options from the command-line.

Documentation

The documentation can be generated using Doxygen. A Doxyfile is provided for your convenience.

Requirements

  • PHP 5.4.0 or above.

Authors

Filippo F. Fadda - filippo.fadda@programmazione.it - http://www.linkedin.com/in/filippofadda

License

Facebook Object Debugger CLI is licensed under the Apache License, Version 2.0 - see the LICENSE file for details.