Packageyourminis.api.social
Classpublic class Facebook
InheritanceFacebook Inheritance SocialBase Inheritance flash.events.EventDispatcher
ImplementsIFacebook, ISocial

The Facebook class is responsible for handling Simple Social API requests specific to facebook

See also

yourminis.api.social.SocialBase


Public Properties
 PropertyDefined by
 InheritedACTIVITY_CREATED : String
Event fired when an activity has been created
SocialBase
 InheritedAUTHENTICATION_COMPLETE : String
Event fired when authentication is completed
SocialBase
 Inheriteddelegate_friends : *
SocialBase
 InheritedFriends : Array
Get Friends - returns the yourminis version of friends, returning common data across opensocial and facebook
SocialBase
  ProfileID : String
[read-only] Provide read-only access to the Faceebook Profile ID
Facebook
  SessionKey : String
[read-only] Provide read-only access to the Faceebook Session ID
Facebook
 InheritedSOCIAL_ONGETFRIENDS : String
Event fired when social friends have been retrieved
SocialBase
  UserID : String
[read-only] Provide read-only access to the Faceebook User ID
Facebook
 Inheritedym_friends : *
SocialBase
 Inheritedym_social_type : String
SocialBase
Protected Properties
 PropertyDefined by
 Inheritedapi : IApiBase
SocialBase
 Inheritedwidget : Widget
SocialBase
Public Methods
 MethodDefined by
  
Facebook(_widget:Widget)
Facebook
  
createActivity(title:String, body:String, summary:String = null, url:String = null, media:Array = null):void
Social method which delegates to publishUserAction for publishing activity related information within facebook
Facebook
  
getCurrentView():String
Facebook
  
getFriends():void
Get a list of friends from the current profile
Facebook
 Inherited
getParameter(parameter_name:String):String
Returns the value of the specified parameter if it has been passed in by the social application, an empty string if not.
SocialBase
 Inherited
isBebo():Boolean
This function returns true if the widget is running on the Bebo platform, false otherwise
SocialBase
  
isFacebook():Boolean
This function returns true if the widget is running on the Facebook platform, false otherwise
Facebook
 Inherited
isOpensocial():Boolean
This function returns true if the widget is running on the OpenSocial platform, false otherwise
SocialBase
 Inherited
isSocial():Boolean
This function returns true if the widget is running on a social platform, false otherwise
SocialBase
  
publishActionOfUser(title:String, body:String, image1:String = null, image1link:String = null, image2:String = null, image2link:String = null, image3:String = null, image3link:String = null, image4:String = null, image4link:String = null):void
Obsolete.
Facebook
  
publishUserAction(template_bundle_id:Number, template_data:Object = null, target_ids:String = null, body_general:String = null, story_size:int = 1):void
Publishes a story on behalf of the user owning the session, using the specified template bundle.
Facebook
Property detail
ProfileIDproperty
ProfileID:String  [read-only]

Provide read-only access to the Faceebook Profile ID

Implementation
    public function get ProfileID():String

Example
The following example prints the Profile ID to the debug console
   import yourminis.api.IWidget
   var widget:IWidget;
   addEventListener("widget-loaded",onWidgetLoaded);
   function onWidgetLoaded(evt:Event):void {
    widget.initWidget(300,250,0x000000);
    widget.debugMode = true;
    widget.debug("The Profile ID is: " + widget.social.ProfileID);
   }
  

SessionKeyproperty 
SessionKey:String  [read-only]

Provide read-only access to the Faceebook Session ID

Implementation
    public function get SessionKey():String

Example
The following example prints the session key to the debug console
   import yourminis.api.IWidget
   var widget:IWidget;
   addEventListener("widget-loaded",onWidgetLoaded);
   function onWidgetLoaded(evt:Event):void {
    widget.initWidget(300,250,0x000000);
    widget.debugMode = true;
    widget.debug("The Session Key is: " + widget.social.SessionKey);
   }
  

UserIDproperty 
UserID:String  [read-only]

Provide read-only access to the Faceebook User ID

Implementation
    public function get UserID():String

Example
The following example prints the User ID to the debug console
   import yourminis.api.IWidget
   var widget:IWidget;
   addEventListener("widget-loaded",onWidgetLoaded);
   function onWidgetLoaded(evt:Event):void {
    widget.initWidget(300,250,0x000000);
    widget.debugMode = true;
    widget.debug("The User ID is: " + widget.social.UserID);
   }
  

Constructor detail
Facebook()constructor
public function Facebook(_widget:Widget)Parameters
_widget:Widget
Method detail
createActivity()method
public override function createActivity(title:String, body:String, summary:String = null, url:String = null, media:Array = null):void

Social method which delegates to publishUserAction for publishing activity related information within facebook

Parameters
title:String
 
body:String
 
summary:String (default = null)
 
url:String (default = null)
 
media:Array (default = null)

See also

getCurrentView()method 
public override function getCurrentView():String

Returns
String

See also

yourminis.api.social.SocialBase()
getFriends()method 
public override function getFriends():void

Get a list of friends from the current profile

See also

yourminis.api.social.socialBase.getFriends()
isFacebook()method 
public override function isFacebook():Boolean

This function returns true if the widget is running on the Facebook platform, false otherwise

Returns
Boolean

See also

publishActionOfUser()method 
public function publishActionOfUser(title:String, body:String, image1:String = null, image1link:String = null, image2:String = null, image2link:String = null, image3:String = null, image3link:String = null, image4:String = null, image4link:String = null):void

Obsolete. This API call is no longer supported.

Parameters
title:String
 
body:String
 
image1:String (default = null)
 
image1link:String (default = null)
 
image2:String (default = null)
 
image2link:String (default = null)
 
image3:String (default = null)
 
image3link:String (default = null)
 
image4:String (default = null)
 
image4link:String (default = null)

See also

publishUserAction()method 
public function publishUserAction(template_bundle_id:Number, template_data:Object = null, target_ids:String = null, body_general:String = null, story_size:int = 1):void

Publishes a story on behalf of the user owning the session, using the specified template bundle. This method requires an active session key in order to be called. The API call returns true if all succeeds, and false if the user never authorized the application to publish to his or her Wall. An application can publish a maximum of 10 stories per user per day.

Parameters
template_bundle_id:Number
 
template_data:Object (default = null)
 
target_ids:String (default = null)
 
body_general:String (default = null)
 
story_size:int (default = 1)

See also