/** * Request the facebook authentication * * @param activity * @param activityCode the result code which will be handled on the onActivityResult method */ public static void loginRequest(Activity activity, int activityCode) { Facebook mFb = FacebookProvider.getFacebook(); if (!mFb.isSessionValid()) { mFb.authorize( activity, activity.getResources().getStringArray(R.array.share_facebook_permissions), activityCode, new LoginDialogListener(activity.getApplicationContext())); } }