Packagecom.distriqt.extension.facebookapi.accountkit
Interfacepublic interface AccountKit extends flash.events.IEventDispatcher

Access to the Facebook Account Kit SDK



Public Properties
 PropertyDefined By
  isSupported : Boolean
[read-only] Checks if the Account Kit functionality is available on the current device, returns true if the functionality in this class is supported.
AccountKit
Public Methods
 MethodDefined By
  
getAccountInfo():Boolean
Asynchronously retrieves the Account Kit account information
AccountKit
  
loginWithEmail(email:String = null):Boolean
AccountKit
  
loginWithPhone(countryCode:String = null, phoneNumber:String = null):Boolean
AccountKit
  
logout():Boolean
Logout the current account
AccountKit
  
setup(type:String):Boolean
Setup the Account Kit SDK with the required response type.
AccountKit
Events
 Event Summary Defined By
   Dispatched after a successful call to getAccountInfo account will contain the details of the logged in account.AccountKit
   Dispatched after an error occurred during the call to getAccountInfo AccountKit
   Dispatched when the user cancelled the login.AccountKit
   Dispatched when an error occurred.AccountKit
   Dispatched when the login succeeded and returned an access token.AccountKit
   Dispatched when the login succeeded and returned an authorisation code.AccountKit
   Dispatched when Account Kit is initialised and ready to be used.AccountKit
Property Detail
isSupportedproperty
isSupported:Boolean  [read-only]

Checks if the Account Kit functionality is available on the current device, returns true if the functionality in this class is supported.


Implementation
    public function get isSupported():Boolean
Method Detail
getAccountInfo()method
public function getAccountInfo():Boolean

Asynchronously retrieves the Account Kit account information

Returns
Booleantrue if the process was started successfully and false otherwise
loginWithEmail()method 
public function loginWithEmail(email:String = null):Boolean

Parameters

email:String (default = null)

Returns
Booleantrue if the process was started successfully and false otherwise
loginWithPhone()method 
public function loginWithPhone(countryCode:String = null, phoneNumber:String = null):Boolean

Parameters

countryCode:String (default = null)
 
phoneNumber:String (default = null)

Returns
Booleantrue if the process was started successfully and false otherwise
logout()method 
public function logout():Boolean

Logout the current account

Returns
Booleantrue if the process was started successfully and false otherwise
setup()method 
public function setup(type:String):Boolean

Setup the Account Kit SDK with the required response type.

Parameters

type:String — The ResponseType to use in the Account Kit SDK This must match the configuration of your application Account Kit product.

Returns
Booleantrue if successfully started and false if the API is already setup or there was an error
Event Detail
accountKit:accountInfo Event
Event Object Type: com.distriqt.extension.facebookapi.events.AccountKitEvent
AccountKitEvent.type property = com.distriqt.extension.facebookapi.events.AccountKitEvent.ACCOUNTINFO

Dispatched after a successful call to getAccountInfo

account will contain the details of the logged in account.

accountKit:accountInfo:error Event  
Event Object Type: com.distriqt.extension.facebookapi.events.AccountKitEvent
AccountKitEvent.type property = com.distriqt.extension.facebookapi.events.AccountKitEvent.ACCOUNTINFO_ERROR

Dispatched after an error occurred during the call to getAccountInfo

accountKit:cancelled Event  
Event Object Type: com.distriqt.extension.facebookapi.events.AccountKitEvent
AccountKitEvent.type property = com.distriqt.extension.facebookapi.events.AccountKitEvent.CANCELLED

Dispatched when the user cancelled the login.

accountKit:error Event  
Event Object Type: com.distriqt.extension.facebookapi.events.AccountKitEvent
AccountKitEvent.type property = com.distriqt.extension.facebookapi.events.AccountKitEvent.ERROR

Dispatched when an error occurred.

errorCode and errorMessage will contain details on the error that occurred.

accountKit:login:accessToken Event  
Event Object Type: com.distriqt.extension.facebookapi.events.AccountKitEvent
AccountKitEvent.type property = com.distriqt.extension.facebookapi.events.AccountKitEvent.LOGIN_WITH_ACCESSTOKEN

Dispatched when the login succeeded and returned an access token.

accessToken will contain the returned token.

accountKit:login:authorisationCode Event  
Event Object Type: com.distriqt.extension.facebookapi.events.AccountKitEvent
AccountKitEvent.type property = com.distriqt.extension.facebookapi.events.AccountKitEvent.LOGIN_WITH_AUTHORISATIONCODE

Dispatched when the login succeeded and returned an authorisation code.

authorisationCode will contain the returned code.

accountKit:setupComplete Event  
Event Object Type: com.distriqt.extension.facebookapi.events.AccountKitEvent
AccountKitEvent.type property = com.distriqt.extension.facebookapi.events.AccountKitEvent.SETUP_COMPLETE

Dispatched when Account Kit is initialised and ready to be used.