这是我的Facebook登录网址,其中包含IP地址。我只是在配置文件中添加了网址。不知道该IP从何而来。
这是我的配置文件代码
$config['facebook_app_id'] = 'xxxxxxxxxxxx';
$config['facebook_app_secret'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$config['facebook_login_type'] = 'web';
$config['facebook_login_redirect_url'] = 'https://demo.domain.com/home/';
$config['facebook_logout_redirect_url'] = 'https://demo.domain.com/login/logout/';
$config['facebook_permissions'] = array('email');
$config['facebook_graph_version'] = 'v2.6';
$config['facebook_auth_on_load'] = TRUE;
这是login.php文件代码
public function index(){
$userData = array();
if($this->facebook->is_authenticated()){
$userProfile = $this->facebook->request('get', '/me?fields=id,first_name,last_name,email,gender,locale,picture');
echo "<pre>";
print_r($userProfile);
die;
}
else
{
$data['authUrl'] = $this->facebook->login_url();
}
$this->load->view('login',$data);
}
请帮助
谢谢