Skip to content

Instantly share code, notes, and snippets.

@tfountain
Created February 26, 2014 12:57
Show Gist options
  • Save tfountain/9229049 to your computer and use it in GitHub Desktop.
Save tfountain/9229049 to your computer and use it in GitHub Desktop.
Facebook SDK
public function someAction()
{
$facebook = $this->getServiceLocator()->get('Facebook');
}
public function getServiceConfig()
{
return array(
'factories' => array(
'Facebook' => function($sm) {
$config = $sm->get('Config');
$facebookConfig = isset($config['facebook']) ? $config['facebook'] : array();
return new Facebook($facebookConfig);
},
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment