public function login(){
$this->load->library('facebook'); // Automatically picks appId and secret from config
$user = $this->facebook->getUser();
if ($user) {
try {
$data['user_profile'] = $this->facebook->api('/me');
} catch (FacebookApiException $e) {
$user = null;
}
答案 0 :(得分:0)
你必须初始化配置..试试这个,
$fb_config = array(
'appId' => 'YOUR APPID',
'secret' => 'SECRET KEY'
);
$this->load->library('facebook', $fb_config);