0

I'm developing an web application in Java and using facebook account for login to my applications. After sucessfull login i need to get the logged in facebook account user friend's details including email id's. I can get the logged in user's friend's profile details but not the email ids of them. It always shows null. How do i get the email ids of my facebook friends.

Any help is very much appreciated.

dgw
  • 13,418
  • 11
  • 56
  • 54
  • Emails are only visible to other people if the privileges/permissions are set. Likely they prevent applications from viewing emails if they aren't set to public. Although I'm not certain. – Reinard Mar 27 '12 at 12:20

1 Answers1

0

Currently, this is not supported by Facebook. You cannot get user's friends' email, regardless of what permissions the user gives your app. Refer to the this for details.

Tejas
  • 651
  • 5
  • 10
  • Thanks to all those provided thier inputs. IF not getting the email id's directly, is it possible to have a FB method to send invite notification to the facebook account and once they accept the invite we will get the email id. For. ex. FB.notification.send or FB.notification.sendEmail etc. if possible, can some code give me the sample code to test the same. – Poobalan Rathinam Mar 28 '12 at 04:26
  • In addition to my thread, i would like to implement a similar kind of notification request functionality that myyearbook.com does. this site has the facility to send invite requests to FB users to join the myyearbook application. Once the invited users login to facebook they can see a request pending in the request globe and once they accept the invite, they are a part of this application. I would like to implement the same functionality. which FB function does this sendrequest functionality. – Poobalan Rathinam Mar 28 '12 at 10:47
  • http://stackoverflow.com/questions/2713379/showing-popup-in-the-new-facebook-javascript-sdk - this article explains how to implement the functionality you suggested. Once a user has accepted your application, it is possible for you to get her email ID (provided you ask for the "email" permission. Does that answer your question? – Tejas Mar 28 '12 at 15:05
  • Thanks Tejas. My question is before the user had accepted my request, i need to get the email id of them as they are already a part of my FB friends list.But i believe, the only way to send invite is to us javascript FB.ui method and FB takes care of displaying the FB users and sending invite. – Poobalan Rathinam Mar 29 '12 at 10:10
  • If you have the solution, I suggest you accept the answer (or provide one) and close the question. – Tejas Mar 30 '12 at 20:01