I have searched a lot for past two days and I was not successful. I am following the Authenticate-Facebook Developers link for setting up the Facebook native login. I add the following code to SplashFragment.java
:
authButton = (LoginButton) view.findViewById(R.id.fb_logIn_btn);
authButton.setPublishPermissions(PERMISSION);
authButton.setDefaultAudience(SessionDefaultAudience.ONLY_ME);
But this does not work.
In my app, I want to alert the user to enter the privacy mode(SessionDefaultAudience.EVERYONE
or SessionDefaultAudience.ONLY_ME
or SessionDefaultAudience.FRIENDS
) to set their privacy setting for their post through the application.
I also went through Session.NewPermissionsRequest-Facebook Developers but how to implement this?
You can change the audience and the Permission like that:
Just change this line to the audience you want