| Package | com.myflashlab.air.extensions.fb |
| Class | public class Facebook |
| Inheritance | Facebook 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.
| Property | Defined By | ||
|---|---|---|---|
| appEvents : AppEvents [static] [read-only]
Gives you access to the AppEvents API. | |||
| 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. | |||
| games : Games [static] [read-only]
Gives you access to the Games API of Facebook ANE. | |||
| graph : Graph [static] [read-only]
Gives you access to the graph API. | |||
| 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. | |||
| isFacebookMessengerAppInstalled : Boolean [static] [read-only]
Indicates if the Messenger application is installed on the running device or not. | |||
| 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. | |||
| listener : EventDispatcher [static] [read-only]
API for listening to Facebook events. | |||
| share : Share [static] [read-only]
Gives you access to the share tools available on Facebook ANE. | |||
| Method | Defined By | ||
|---|---|---|---|
addLoggingBehavior($loggingBehavior:int):void [static]
Enables a particular extended logging in the SDK. | |||
clearLoggingBehaviors():void [static]
Disables all extended logging behaviors. | |||
getLoggingBehaviors():Array [static]
Returns the types of extended logging that are currently enabled. | |||
init($appId:String):void [static]
Use this method to initialize the Facebook ANE. | |||
isLoggingBehaviorEnabled($loggingBehavior:int):Boolean [static]
Checks if a particular extended logging behavior is enabled. | |||
removeLoggingBehavior($loggingBehavior:int):void [static]
Disables a particular extended logging behavior in the SDK. | |||
| Constant | Defined By | ||
|---|---|---|---|
| EXTENSION_ID : String = com.myflashlab.air.extensions.facebook [static] Extension ID for this extension | |||
| VERSION : String = 6.0.1 [static] current version number of this extension | |||
| appEvents | property |
appEvents:AppEvents [read-only] Gives you access to the AppEvents API.
public static function get appEvents():AppEvents| auth | property |
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.
public static function get auth():Auth| games | property |
games:Games [read-only] Gives you access to the Games API of Facebook ANE. For example to send game requests.
public static function get games():Games| graph | property |
graph:Graph [read-only] Gives you access to the graph API.
public static function get graph():Graph| hashKey | property |
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.
public static function get hashKey():StringError — error before calling any of the static methods of this calss, you need to have
called getInstance("000000"); in your project.
|
| isFacebookMessengerAppInstalled | property |
isFacebookMessengerAppInstalled:Boolean [read-only] Indicates if the Messenger application is installed on the running device or not.
public static function get isFacebookMessengerAppInstalled():Boolean| limitEventAndDataUsage | property |
limitEventAndDataUsage:BooleanReturns 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.
public static function get limitEventAndDataUsage():Boolean public static function set limitEventAndDataUsage(value:Boolean):void| listener | property |
listener:EventDispatcher [read-only] API for listening to Facebook events.
public static function get listener():EventDispatcher| share | property |
share:Share [read-only] Gives you access to the share tools available on Facebook ANE.
public static function get share():Share| addLoggingBehavior | () | method |
public static function addLoggingBehavior($loggingBehavior:int):voidEnables a particular extended logging in the SDK.
Parameters
$loggingBehavior:int — The LoggingBehavior to enable
|
| clearLoggingBehaviors | () | method |
public static function clearLoggingBehaviors():voidDisables all extended logging behaviors.
| getLoggingBehaviors | () | method |
public static function getLoggingBehaviors():ArrayReturns the types of extended logging that are currently enabled.
ReturnsArray — An Array containing enabled logging behaviors
|
| init | () | method |
public static function init($appId:String):voidUse 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):BooleanChecks if a particular extended logging behavior is enabled.
Parameters
$loggingBehavior:int — The LoggingBehavior to check
|
Boolean — whether behavior is enabled
|
| removeLoggingBehavior | () | method |
public static function removeLoggingBehavior($loggingBehavior:int):voidDisables a particular extended logging behavior in the SDK.
Parameters
$loggingBehavior:int — The LoggingBehavior to disable
|
| EXTENSION_ID | Constant |
public static const EXTENSION_ID:String = com.myflashlab.air.extensions.facebookExtension ID for this extension
| VERSION | Constant |
public static const VERSION:String = 6.0.1current version number of this extension