Packagecom.myflashlab.air.extensions.fb
Classpublic class Facebook
InheritanceFacebook Inheritance flash.events.EventDispatcher

The entry point for using the Facebook ANE. If you are planing to use this ANE in your project, you must initialize it as soon as possible. preferably in your AIR documentClass constructor, to make sure the FacebookEvents.INVOKE event can be catched on time.

To start the ANE, call Facebook.init("FB_APP_ID"); then immediately add the listeners, FacebookEvents.INIT and FacebookEvents.INVOKE.



Public Properties
 PropertyDefined By
  appEvents : AppEvents
[static] [read-only] Gives you access to the AppEvents API.
Facebook
  auth : Auth
[static] [read-only] Gives you access to the auth API of facebook ANE to enable you login/out users with read or write permissions.
Facebook
  games : Games
[static] [read-only] Gives you access to the Games API of Facebook ANE.
Facebook
  graph : Graph
[static] [read-only] Gives you access to the graph API.
Facebook
  hashKey : String
[static] [read-only] (Android only) When developing your application, your facebook developer consoles will ask you to enter your app hash key so your app will safely be connected to your facebook app.
Facebook
  isFacebookMessengerAppInstalled : Boolean
[static] [read-only] Indicates if the Messenger application is installed on the running device or not.
Facebook
  limitEventAndDataUsage : Boolean
[static] Returns whether data such as those generated through AppEvents and sent to Facebook should be restricted from being used for purposes other than analytics and conversions, such as targeting ads to this user.
Facebook
  listener : EventDispatcher
[static] [read-only] API for listening to Facebook events.
Facebook
  share : Share
[static] [read-only] Gives you access to the share tools available on Facebook ANE.
Facebook
Public Methods
 MethodDefined By
  
addLoggingBehavior($loggingBehavior:int):void
[static] Enables a particular extended logging in the SDK.
Facebook
  
[static] Disables all extended logging behaviors.
Facebook
  
[static] Returns the types of extended logging that are currently enabled.
Facebook
  
init($appId:String):void
[static] Use this method to initialize the Facebook ANE.
Facebook
  
isLoggingBehaviorEnabled($loggingBehavior:int):Boolean
[static] Checks if a particular extended logging behavior is enabled.
Facebook
  
removeLoggingBehavior($loggingBehavior:int):void
[static] Disables a particular extended logging behavior in the SDK.
Facebook
Public Constants
 ConstantDefined By
  EXTENSION_ID : String = com.myflashlab.air.extensions.facebook
[static] Extension ID for this extension
Facebook
  VERSION : String = 6.0.1
[static] current version number of this extension
Facebook
Property Detail
appEventsproperty
appEvents:AppEvents  [read-only]

Gives you access to the AppEvents API.


Implementation
    public static function get appEvents():AppEvents
authproperty 
auth:Auth  [read-only]

Gives you access to the auth API of facebook ANE to enable you login/out users with read or write permissions.


Implementation
    public static function get auth():Auth
gamesproperty 
games:Games  [read-only]

Gives you access to the Games API of Facebook ANE. For example to send game requests.


Implementation
    public static function get games():Games
graphproperty 
graph:Graph  [read-only]

Gives you access to the graph API.


Implementation
    public static function get graph():Graph
hashKeyproperty 
hashKey:String  [read-only]

(Android only) When developing your application, your facebook developer consoles will ask you to enter your app hash key so your app will safely be connected to your facebook app. to do so, all you have to do is to first initialize the extension by calling init("000000"); and then call this property and the hash key will be generated and returned to you. use this hash code in your facebook console and of course you won't be needing to call this prop ever again.


Implementation
    public static function get hashKey():String

Throws
Error — error before calling any of the static methods of this calss, you need to have called getInstance("000000"); in your project.
isFacebookMessengerAppInstalledproperty 
isFacebookMessengerAppInstalled:Boolean  [read-only]

Indicates if the Messenger application is installed on the running device or not.


Implementation
    public static function get isFacebookMessengerAppInstalled():Boolean
limitEventAndDataUsageproperty 
limitEventAndDataUsage:Boolean

Returns whether data such as those generated through AppEvents and sent to Facebook should be restricted from being used for purposes other than analytics and conversions, such as targeting ads to this user. Defaults to false. This value is stored on the device and persists across app launches.


Implementation
    public static function get limitEventAndDataUsage():Boolean
    public static function set limitEventAndDataUsage(value:Boolean):void
listenerproperty 
listener:EventDispatcher  [read-only]

API for listening to Facebook events.


Implementation
    public static function get listener():EventDispatcher
shareproperty 
share:Share  [read-only]

Gives you access to the share tools available on Facebook ANE.


Implementation
    public static function get share():Share
Method Detail
addLoggingBehavior()method
public static function addLoggingBehavior($loggingBehavior:int):void

Enables a particular extended logging in the SDK.

Parameters

$loggingBehavior:int — The LoggingBehavior to enable

clearLoggingBehaviors()method 
public static function clearLoggingBehaviors():void

Disables all extended logging behaviors.

getLoggingBehaviors()method 
public static function getLoggingBehaviors():Array

Returns the types of extended logging that are currently enabled.

Returns
Array — An Array containing enabled logging behaviors
init()method 
public static function init($appId:String):void

Use this method to initialize the Facebook ANE. You need to create a new facebook app in your facebook developer account first and then enter your app ID here.

Parameters

$appId:String

isLoggingBehaviorEnabled()method 
public static function isLoggingBehaviorEnabled($loggingBehavior:int):Boolean

Checks if a particular extended logging behavior is enabled.

Parameters

$loggingBehavior:int — The LoggingBehavior to check

Returns
Boolean — whether behavior is enabled
removeLoggingBehavior()method 
public static function removeLoggingBehavior($loggingBehavior:int):void

Disables a particular extended logging behavior in the SDK.

Parameters

$loggingBehavior:int — The LoggingBehavior to disable

Constant Detail
EXTENSION_IDConstant
public static const EXTENSION_ID:String = com.myflashlab.air.extensions.facebook

Extension ID for this extension

VERSIONConstant 
public static const VERSION:String = 6.0.1

current version number of this extension