v0.1 2013-10-14 22:17 UTC


This is a wrapper for Facebook Test User API. It allows you to create, read, update and delete Facebook test users in OOP style.


You can install it through composer with this command:

$ php composer.phar require --dev rinatio/Facebook:~0.1

After installing, you need to require Composer's autoloader:

require 'vendor/autoload.php';


Load namespaced classes like this:

use rinatio\Facebook\Test\User as TestUser;
use rinatio\Facebook\Facebook;

Define your Facebook application credentials:


Now you're ready to go. Here are some examples

Create a new users:

$user1 = TestUser::create(array(
    'name' => 'Butch Cassidy'

Fetch user's profile

$user2 = TestUser::create(array(
    'name' => 'Etta Place'
echo $user2->first_name; // outputs 'Etta'

Get all test users created for application:

$users = TestUser::all();

Change user's name or password:

    'name' => 'Sundance Kid'

Add friends connection:


Delete user:


Or delete all users: