Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class FacebookController extends Classes_SystemAction {
- public function faceAction(){
- $this->_helper->viewRenderer->setNoRender(true);
- $config = array(
- 'appId' => '181381211953614',
- 'secret' => 'f369a7fe61380ceaac910a393f82a301',
- 'cookie'=>TRUE
- );
- $facebook = new Facebook_Facebook($config);
- $user = $facebook->getUser();
- if($user) {
- var_dump($facebook);
- exit();
- } else {
- $url = $facebook->getLoginURL();
- echo '<script type="text/javascript">top.location.href="$url"</script>';
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement