This repository has been archived by the owner on Aug 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 349
Configuration
slawekkrol edited this page Jun 22, 2015
·
5 revisions
Add next lines in your Application
or Activity
class.
-
Define and select permissions you need:
Permission[] permissions = new Permission[] { Permission.USER_PHOTOS, Permission.EMAIL, Permission.PUBLISH_ACTION };
-
Build and define the configuration by putting
app_id
,namespace
andpermissions
:SimpleFacebookConfiguration configuration = new SimpleFacebookConfiguration.Builder() .setAppId("625994234086470") .setNamespace("sromkuapp") .setPermissions(permissions) .build();
-
And, set this configuration:
SimpleFacebook.setConfiguration(configuration);
There is no need to set the configuration in any activity, it should be done just once.
In each Activity
where you want to use the library, just override the onResume()
and set SimpleFacebook
instance:
@Override
public void onResume() {
super.onResume();
mSimpleFacebook = SimpleFacebook.getInstance(this);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
mSimpleFacebook.onActivityResult(requestCode, resultCode, data);
super.onActivityResult(requestCode, resultCode, data);
}
-
Setup 🔻
-
Login/Logout
-
Publish
-
Requests/Invite
-
Get
-
Additional options
-
Samples