0

In My Application I have Facebook Login Functionality and then getting User's Friends List and my fb App was created before 30/04/2014 that is why i am able to fetch friends list as per version v1.0 and sdk 3.14 but i am getting some issue... i did not get Friends List only get those friend who use fb app.. so my issue is about Pass permission

String[] FB_Permission_Friends = {"email", "public_profile", "user_address",
            "user_birthday", "user_mobile_phone",
            "user_hometown", "user_location",
            "friends_hometown", "friends_location",
            "friends_checkins", "read_friendlists",
            "friends_birthday", "friends_online_presence",
            "user_online_presence", "user_status"};

my code..

 public void FbLogin() {
    FacebookData.Session = createSession();
    Settings.addLoggingBehavior(LoggingBehavior.INCLUDE_ACCESS_TOKENS);
    if (!FacebookData.Session.isOpened()) {
        FacebookData.Session.openForRead(new Session.OpenRequest(this).setCallback(callback).setPermissions(FB_Permission_Friends));
    }
}

private Session createSession() {
    Session activeSession = Session.getActiveSession();
    if (activeSession == null || activeSession.getState().isClosed()) {
        activeSession = new Session.Builder(SocialNetworkActivity.this).setApplicationId(Constant.Fb_APP_ID).build();
        Session.setActiveSession(activeSession);
    }
    return activeSession;
}

  Session.StatusCallback callback = new Session.StatusCallback() {
    public void call(Session session, SessionState state, Exception exception) {
        if (exception != null) {
            new AlertDialog.Builder(SocialNetworkActivity.this)
                    .setTitle("Login failed")
                    .setMessage(exception.getMessage())
                    .setPositiveButton("OK", null)
                    .show();
            FacebookData.Session = createSession();
        }
    }
};
Android_Paradise
  • 325
  • 1
  • 5
  • 15
  • If you are only getting the friends that are using your app you are either using API v2.0. Or your app wasn't active before 30/04/2014 even if it was created before that and then we force you to use v2.0 – WizKid Jul 14 '14 at 16:08
  • some time getting whole friends List some time not getting....so m confuse about this...and my fb app was active before 30/04/2014 – Android_Paradise Jul 15 '14 at 06:36

0 Answers0