WhatsUp
WhatsUp

Reputation: 463

facebook sdk 3.15 set mandatory permissions

I search a mean to set permissions like email or user_friends mandatory. I use the facebook login button with the method setReadPermissions. Currently when i check permissions on my account for my app i get email et user_friends optional. Without friendlist my app is useless.

My code below :

LoginButton authButton = (LoginButton) findViewById(R.id.login_button);
authButton.setReadPermissions(Arrays.asList("public_profile","email","user_friends"));

Upvotes: 0

Views: 597

Answers (1)

Alan Klaassen
Alan Klaassen

Reputation: 91

https://developers.facebook.com/docs/reference/android/current/class/Session/#getPermissions

Use getPermissions(), isPermissionGranted() or getDeclinedPermissions() to check the current permissions, and if they haven't granted the permissions you deem mandatory post them a notice saying that they need to grant a permission to use your application, preferably with some sort of button that they can click to make a call to the requestNewReadPermissions() function.

Upvotes: 1

Related Questions