Last active
October 13, 2015 14:12
-
-
Save YOzaz/acec780e0b75bd62b12d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace MyApp\Controllers; | |
use \BaseController; | |
class FacebookControler extends BaseController | |
{ | |
/** | |
* Facebook token manager | |
* | |
* @return mixed | |
**/ | |
public function getFacebookToken( $response = null ) | |
{ | |
$fb = new \MyApp\Utils\Facebook(); | |
if ( isset($response) ) | |
{ | |
$result = $fb->parseTokenResult(); | |
return $result; | |
} | |
else | |
{ | |
$url = fb->getLoginUrl([ | |
'manage_pages' | |
]); | |
return redirect( $url ); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment