Packagecom.distriqt.extension.facebook.appevents
Classpublic class AppEvent
InheritanceAppEvent Inheritance Object

This class represents data to be used for sending Facebook App Events.

Note that only the eventName is required. parameters and valueToSum are optional.

See also

https://developers.facebook.com/docs/ios/app-events
https://developers.facebook.com/docs/android/app-events


Public Properties
 PropertyDefined By
  eventName : String
The name of the event.
AppEvent
  parameters : Object
[read-only] A key/value object storing additional parameters to be sent with the event (optional) Keys must be of type String, while their values must either be a String or a Number.
AppEvent
  valueToSum : Number = 0
The valueToSum value for the event (optional). These values are aggregated and averaged in Facebook insights for each event type Setting this value to 0 will cause it to be ignored and not sent with your event.
AppEvent
Public Methods
 MethodDefined By
  
AppEvent(eventName:String, valueToSum:Number = 0)
Constructor
AppEvent
  
Removes a parameter from this event
AppEvent
  
setEventName(name:String):AppEvent
AppEvent
  
setParameter(key:String, value:*):AppEvent
Adds or updates a parameter for this event Keys must be of type String, while their values must either be a String or a Number.
AppEvent
  
setValueToSum(value:Number):AppEvent
AppEvent
  
toObject():Object
AppEvent
Property Detail
eventNameproperty
public var eventName:String

The name of the event. May be one of the standard Facebook event types or any custom name.

See also

parametersproperty 
parameters:Object  [read-only]

A key/value object storing additional parameters to be sent with the event (optional)

Keys must be of type String, while their values must either be a String or a Number. Anything which does not match these types will be converted to a String.

While you can modify this object directly, it's recommended to use the setParameter and removeParameter methods to ensure data validation.


Implementation
    public function get parameters():Object
valueToSumproperty 
public var valueToSum:Number = 0

The valueToSum value for the event (optional).

These values are aggregated and averaged in Facebook insights for each event type

Setting this value to 0 will cause it to be ignored and not sent with your event. This is the default value.

Constructor Detail
AppEvent()Constructor
public function AppEvent(eventName:String, valueToSum:Number = 0)

Constructor

Parameters
eventName:String
 
valueToSum:Number (default = 0)
Method Detail
removeParameter()method
public function removeParameter(key:String):AppEvent

Removes a parameter from this event

Parameters

key:String — String - name of the parameter

Returns
AppEventAppEvent instance for chaining calls
setEventName()method 
public function setEventName(name:String):AppEvent

Parameters

name:String

Returns
AppEventAppEvent instance for chaining calls
setParameter()method 
public function setParameter(key:String, value:*):AppEvent

Adds or updates a parameter for this event Keys must be of type String, while their values must either be a String or a Number. Any value which does not match these types will be converted to a String.

Parameters

key:String — String - name of the parameter
 
value:* — String or Number - value of the parameter

Returns
AppEventAppEvent instance for chaining calls
setValueToSum()method 
public function setValueToSum(value:Number):AppEvent

Parameters

value:Number

Returns
AppEventAppEvent instance for chaining calls
toObject()method 
public function toObject():Object

Returns
Object