Skip to content

Instantly share code, notes, and snippets.

@kangwa
Created January 3, 2018 00:42
Show Gist options
  • Save kangwa/13a62d93fe7fa28bda901e4a7dfa14f1 to your computer and use it in GitHub Desktop.
Save kangwa/13a62d93fe7fa28bda901e4a7dfa14f1 to your computer and use it in GitHub Desktop.
Nativescript AccountKit Login
function accountKitLogin(loginType) {
var accountKitConfig = com.facebook.accountkit.ui.AccountKitConfiguration;
var intent = new android.content.Intent(activity, accountKitActivity.class);
var configBuilder = new accountKitConfig.AccountKitConfigurationBuilder(loginType, accountKitActivity.ResponseType.CODE);
intent.putExtra(
com.facebook.accountkit.ui.AccountKitActivity.ACCOUNT_KIT_ACTIVITY_CONFIGURATION,
configBuilder.build()
)
activity.startActivityForResult(intent, APP_REQUEST_CODE);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment