Used to initialize Account Kit.
string containing the Facebook App ID of your application.
debug: A Boolean specifying whether to display a descriptive error message when an error occurs. If
true, an explicit error message is displayed. If
false, only a generic error is displayed.
display: For SMS login only. A
string containing a value that determines the login display. The two values are
modal. The default value is
display is set to
modal, Account Kit login will display in iframe.
enableSms: A boolean that determines whether SMS verification messages are sent.
fbAppEventsEnabled: A boolean that determines whether Facebook app events logging is enabled. If
true, event logging is enabled.
string containing the URL to which people will be redirected after email confirmation. This is for email only and is optional. Note that this URL must match the URL saved in the Account Kit app settings
state: CSRF protection. A
string, 36 or fewer characters long, containing a non-guessable value which should originate on the server. It is bundled with requests and is returned back to the app client unchanged, and the app client can pass it back to server to verify the match with the original value.
string specifying the Graph API version. This should match the version of Graph API endpoints used in server-to-server communication.
.login(method: string, params: LoginParams, callback: Function)
string specifying the login method. This must be either
LoginParams object, which has the following properties:
countryCode: For use with the
PHONE login method. A
string which should be in the form
phoneNumber: For use with the
PHONE login method. A
string containing 1 to 20 numeric characters.
emailAddress: For use with the
EMAIL login method. A
string containing a valid email address.
callback is a
string indicating the status of the request - see below for the values this string can have.
string contains an authorization code, which your server may exchange for a user access token.
string should match the value of the
state param passed to
Valid values for the
status field above are:
"PARTIALLY_AUTHENTICATED": This indicates that the login was successful, and that you may pass the
code to your server for token exchange to complete authentication.
"NOT_AUTHENTICATED": Failure, for any reason.
"BAD_PARAMS": One or more of the parameters in the
login() request were invalid.