Ogugua Belonwu
Ogugua Belonwu

Reputation: 2141

Unable to retrieve email using using facebook api

I am trying to retrieve user email via facebook after user authentication on my website.

I ran the query below, but the email and birthday fields are empty ; and they are very vital for registration on my website.

#*** run fql ***
   $fql    =   "select uid, first_name, last_name, name, sex, email, current_location, website, interests, birthday, pic_big from user where uid=me()";
   $param  =   array('method' => 'fql.query', 'query' => $fql, 'callback' => '');
   $user   =   $facebook->api($param);print_r($user);

What do i do please

Upvotes: 0

Views: 791

Answers (1)

serg
serg

Reputation: 111265

To access fields like email and birthday you need to request extra permissions during authorization. Full list of permissions is available here.

Upvotes: 2

Related Questions