I implemented facebook in my application using spring social facebook. Its connecting and also getting all details of user..now i want friendslist of user who connected to facebook. Using getFriendProfiles() from facebook GraphApi its working but its retuns only those friends who uses our app...But i want all friends irrespective of they use our app or no...
this is my code:
OAuthInfo oAuthInfo = new OAuthInfo();
Facebook facebook = new FacebookTemplate(connection.createData().getAccessToken());
List<String> friendIds = facebook.friendOperations().getFriendIds();
PagedList<FacebookProfile> friends = facebook.friendOperations().getFriendProfiles();
PagedList<FamilyMember> family=facebook.friendOperations().getFamily();
oAuthInfo.setFriends(friendIds);
oAuthInfo.setFriendsDetails(friends);
oAuthRepo.save(oAuthInfo);
Using Facebook version 2.0.0.M1. Please help ..how to get all friends list .