Skip to content

Instantly share code, notes, and snippets.

@janhalfar
Created July 7, 2011 22:48
Show Gist options
  • Save janhalfar/1070734 to your computer and use it in GitHub Desktop.
Save janhalfar/1070734 to your computer and use it in GitHub Desktop.
facebook domain config example
<?php
namespace Foomo\Facebook\Apps;
use Foomo\Config\AbstractConfig;
use Facebook;
/**
* facebook app domain specific configuration
*/
class DomainConfig extends AbstractConfig {
/**
* @var string
*/
public $id;
/**
* @var string
*/
public $secret;
/**
* @var boolean
*/
public $useCookie;
/**
* get a configured facebook object
*
* @return Facebook
*/
public function getFacebook()
{
return new Facebook(array(
'appId' => $this->id,
'secret' => $this->secret,
'cookie' => $this->useCookie
));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment