This plugin integrates the Facebook's Account Kit. For more info see Account Kit
This is a WIP. Not recommended for production usage.
- Android
- Clone this project
- Add the plugin to your cordova project with the following command
cordova plugin add <PATH_TO>/cordova-plugin-fb-accountkit --variable FB_APP_NAME=<APP_NAME> --variable FB_APP_ID=<APP_ID> --variable FB_CLIENT_TOKEN=<CLIENT_TOKEN>
fbAccountKit.loginWithPhone(success, failure, {"type" : "CODE"}); // currently only 'CODE' is supported
Response:
{
status : "SUCCESS",
authorizationCode : "<auth-code-string>",
finalAuthorizationState : "",
tokenRefreshIntervalInSeconds : 120
}
fbAccountKit.logout(success, failure);
Response:
- 'success' callback gets called