Reputation: 2788
i have a website with facebook sdk 3.2.2 and php 5.3x running. now i made a new facebook app with api 2.4 and no data like name and email is returned anymore. Is there any way to change the php code in the sdk to get the new fields ? i cannot upgrade to php 5.4 so i need a fix to get the necessary fields.
would be nice if anybody can help me !
my website is with codeigniter but i don´t know at the moment where to change the api
maybe here ? it´s very hard to find any good help.
$this->api = new Facebook( ARRAY( 'appId' => $this->config["keys"]["id"],'secret' => $this->config["keys"]["secret"]) );
Upvotes: 2
Views: 362
Reputation: 2788
sometimes it is better to stop and think about it. I have found a solution to get it to work . In my fbauth_core.php file i have changed the following :
// Get user's data and print it
$user = $this->facebook->api('/me');
$this->load->model('auth_model');
to
// Get user's data and print it
// $user = $this->facebook->api('/me');
$user = $this->facebook->api('/me?fields=id,name,email,first_name,last_name,gender');
$this->load->model('auth_model');
and now it is working fine again :) But thanx again !!!
Upvotes: 1