Take the 2-minute tour ×

I'm studying on an android app with using facebook api. I have two activity, first one is to select friends and second one is to send somethings friends wall . I'm getting permission in first activiy but second activity is also requires permission . How can I make first permission in second activity , too .

Is it suitable doing facebook object static?

share|improve this question
add comment

2 Answers

Permissions are associated with a particular Facebook App (you pass the App ID and App Key to the Android Facebook SDK). Hence, if you use the same Facebook App details in both activities, they both will be having the same permissions.

share|improve this answer
add comment

Peace be upon you,

Acquiring friends' info requires curtain permissions. e.g.

session.requestNewReadPermissions(new NewPermissionsRequest(FacebookLogin.this, Arrays.asList("friends_birthday", ...)));

However, publishing requires different permissions. e.g. session.requestNewPublishPermissions(new NewPermissionsRequest(FacebookLogin.this, Arrays.asList("publish_actions")));

I recommend that you ask for permissions on need basis. e.g. by adding permission request command in the implementation of a Button.

share|improve this answer
add comment

Your Answer


