Hey I'm trying to use two different type of permissions.
When I'm using only one, all works fine.
But when I'm using both of them the app crashes:
LoginButton authButton = (LoginButton) view.findViewById(R.id.authButton);
authButton.setReadPermissions(Arrays.asList("friends_games_activity"));
authButton.setPublishPermissions(Arrays.asList("publish_actions"));
How can I add the 2 permissions (friends_games_activity
and publish_actions
) without problems?
You cannot have both permissions in SDK 3.0, you need separate them. You can first open session for read, get what you want and then openForPublish.
Note: In the new SDK, you may ask only for read permissions when you first open a session. You should not prompt your user for publish permissions until the time at which they are actually publishing an action to Facebook. This increases user trust, and also the likelihood that your user will choose to publish stories from your app. To request further permissions, use Session.openForRead or Session.openForPublish.
You need to call clearPermissions. It's described here http://developers.facebook.com/docs/reference/android/3.0/LoginButton/#setReadPermissions(List)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With