GitXplorerGitXplorer
l

php-sdk

public
3 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
ff1170eee9ac63460ad19fe5c5ed06a56b05a89b

the prod version used in PPR

lliuliu committed 14 years ago
Unverified
2343fcaecbd1503770a4223d8aaf8283c1d14ce4

Change test app_id

pptarjan committed 14 years ago
Unverified
1b3edf94e7e73f94f658c4058c6870d6b571820a

fix unit tests

ddaaku committed 14 years ago
Unverified
9147097c22038a8b17c353756f46003100f295c8

Add PHP code to use the new bundled certificates.

committed 14 years ago
Unverified
54d10dff86e673ede3bd2990843c7d594355a7c1

Add support for using the bundled CA chain when the default one isn't found.

committed 14 years ago
Unverified
b14edfa34306e3f112d73fd72e73cf72f473c3d5

Supported the new OAuth2 error format

pptarjan committed 14 years ago

README

The README file for this repository.

Facebook PHP SDK

The Facebook Platform is a set of APIs that make your application more social. Read more about integrating Facebook with your web site on the Facebook developer site.

This repository contains the open source PHP SDK that allows you to utilize the above on your website. 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)

Usage

The examples are a good place to start. The minimal you'll need to have is:

<?php

require './facebook.php';

$facebook = new Facebook(array(
  'appId'  => 'YOUR APP ID',
  'secret' => 'YOUR API SECRET',
  'cookie' => true, // enable optional cookie support
));

To make API calls:

try {
  $me = $facebook->api('/me');
} catch (FacebookApiException $e) {
  error_log($e);
}

Logged in vs Logged out:

if ($facebook->getSession()) {
  echo '<a href="https://raw.githubusercontent.com/liuliu/php-sdk/master/' . $facebook->getLogoutUrl() . '">Logout</a>';
} else {
  echo '<a href="https://raw.githubusercontent.com/liuliu/php-sdk/master/' . $facebook->getLoginUrl() . '">Login</a>';
}

Feedback

We are relying on the GitHub issues tracker linked from above for feedback. File bugs or other issues here.

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 new 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.