2017 © Pedro Peláez
 

library facebook-php-sdk

Facebook PHP SDK

image

thomaswelton/facebook-php-sdk

Facebook PHP SDK

  • Monday, March 20, 2017
  • by thomaswelton
  • Repository
  • 1 Watchers
  • 1 Stars
  • 28,747 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 3169 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Total Downloads, (*1)

Facebook PHP SDK (v.3.2.3), (*2)

The Facebook Platform is a set of APIs that make your app more social., (*3)

This repository contains the open source PHP SDK that allows you to access Facebook Platform from your PHP app. Except as otherwise noted, the Facebook PHP SDK is licensed under the Apache Licence, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html)., (*4)

Usage

The examples are a good place to start. The minimal you'll need to have is:, (*5)

require 'facebook-php-sdk/src/Facebook.php';

$facebook = new Facebook\Facebook(array(
  'appId'  => 'YOUR_APP_ID',
  'secret' => 'YOUR_APP_SECRET',
));

// Get User ID
$user = $facebook->getUser();

To make API calls:, (*6)

if ($user) {
  try {
    // Proceed knowing you have a logged in user who's authenticated.
    $user_profile = $facebook->api('/me');
  } catch (FacebookApiException $e) {
    error_log($e);
    $user = null;
  }
}

You can make api calls by choosing the HTTP method and setting optional parameters:, (*7)

$facebook->api('/me/feed/', 'post', array(
    'message' => 'I want to display this message on my wall'
));

Login or logout url will be needed depending on current user state., (*8)

if ($user) {
  $logoutUrl = $facebook->getLogoutUrl();
} else {
  $loginUrl = $facebook->getLoginUrl();
}

Tests

In order to keep us nimble and allow us to bring you new functionality, without compromising on stability, we have ensured full test coverage of the SDK. We are including this in the open source repository to assure you of our commitment to quality, but also with the hopes that you will contribute back to help keep it stable. The easiest way to do so is to file bugs and include a test case., (*9)

The tests can be executed by using this command from the base directory:, (*10)

phpunit --stderr --bootstrap tests/bootstrap.php tests/tests.php

Contributing

For us to accept contributions you will have to first have signed the Contributor License Agreement., (*11)

When commiting, keep all lines to less than 80 characters, and try to follow the existing style., (*12)

Before creating a pull request, squash your commits into a single commit., (*13)

Add the comments where needed, and provide ample explanation in the commit message., (*14)

Report Issues/Bugs

Bugs, (*15)

Questions, (*16)

The Versions

20/03 2017

dev-master

9999999-dev https://github.com/thomaswelton/facebook-php-sdk

Facebook PHP SDK

  Sources   Download

Apache2

The Requires

  • php >=5.2.0
  • ext-curl *
  • ext-json *

 

The Development Requires

sdk facebook

20/03 2017

3.2.4

3.2.4.0 https://github.com/thomaswelton/facebook-php-sdk

Facebook PHP SDK

  Sources   Download

Apache2

The Requires

  • php >=5.2.0
  • ext-curl *
  • ext-json *

 

The Development Requires

sdk facebook

19/02 2014

v3.2.3

3.2.3.0 https://github.com/thomaswelton/facebook-php-sdk

Facebook PHP SDK

  Sources   Download

Apache2

The Requires

  • php >=5.2.0
  • ext-curl *
  • ext-json *

 

The Development Requires

sdk facebook

14/07 2013

v3.2.2

3.2.2.0 https://github.com/thomaswelton/facebook-php-sdk

Facebook PHP SDK

  Sources   Download

Apache2

The Requires

  • php >=5.2.0
  • ext-curl *
  • ext-json *

 

sdk facebook

27/11 2012

v3.2.1

3.2.1.0 https://github.com/facebook/facebook-php-sdk

Facebook PHP SDK

  Sources   Download

Apache2

The Requires

  • php >=5.2.0
  • ext-curl *
  • ext-json *

 

sdk facebook

14/08 2012

v3.2.0

3.2.0.0 https://github.com/facebook/facebook-php-sdk

Facebook PHP SDK

  Sources   Download

Apache2

The Requires

  • php >=5.2.0
  • ext-curl *
  • ext-json *

 

sdk facebook