Created
January 3, 2018 00:42
-
-
Save kangwa/13a62d93fe7fa28bda901e4a7dfa14f1 to your computer and use it in GitHub Desktop.
Nativescript AccountKit Login
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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