Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/armetiz/armetizfacebookbundle

A simple bundle to expose Facebook SDK
https://github.com/armetiz/armetizfacebookbundle

Last synced: about 1 month ago
JSON representation

A simple bundle to expose Facebook SDK

Awesome Lists containing this project

README

        

ArmetizFacebookBundle
=====================

A simple bundle to expose Facebook SDK.

## Usage example

```php
get("armetiz.facebook");

$facebookSdk->setAccessToken($facebookToken);
$userProfile = $facebookSdk->api('/' . $facebookId, 'GET');
}

}
?>
```

## Installation

Installation is a quick 3 step process:

1. Download ArmetizFacebookBundle using composer
2. Enable the Bundle
3. Configure your application's config.yml

### Step 1: Download ArmetizFacebookBundle using composer

Add ArmetizFacebookBundle in your composer.json:

```js
{
"require": {
"armetiz/facebook-bundle": "*"
}
}
```

Now tell composer to download the bundle by running the command:

``` bash
$ php composer.phar update armetiz/facebook-bundle
```

Composer will install the bundle to your project's `vendor/armetiz` directory.

### Step 2: Enable the bundle

Enable the bundle in the kernel:

``` php
get("armetiz.facebook.myApplicationA");
$facebookSdkB = $this->get("armetiz.facebook.myApplicationB");

$facebookSdkA->setAccessToken($facebookToken);
$facebookSdkB->setAccessToken($facebookToken);

$userProfileFromA = $facebookSdkA->api('/' . $facebookId, 'GET');
$userProfileFromB = $facebookSdkB->api('/' . $facebookId, 'GET');
}

}
?>
```