Namespace: playerio
Language: ActionScript 3
Used to authenticate users towards 3rd party user bases. This class must be accessed via PlayerIO.quickConnect
Methods | |||
|---|---|---|---|
| public |
Authenticate a user towards Facebook |
||
| public |
Connects the user to Player.IO via Facebook, by opening a Facebook login window where the user can enter his Facebook credentials to login to your game. |
||
| public |
|
||
| public |
|
||
| public |
Authenticate a user towards Kongreate |
||
| public |
Authenticate a user towards the Player.IO simple user database |
||
| public |
|
||
| public |
Sends an recover password email to a user stored using the Player.IO simple user database. |
||
| public |
Creates a user in the Player.IO simple user database |
||
Authenticate a user towards Facebook
| flash.display:Stage | stage |
| A reference to the base stage of your project. | |
| String | gameId |
| Unique ID that identifies which game the client will try to connect to | |
| String | uid |
| Faceboook userid of the user you wish to authenticate. | |
| String | sessionKey |
| Session key of the user you wish to authenticate | |
| String | partnerId |
| String that identifies a possible affiliate partner. | |
| Function | callback |
| Function executed on successful connect: function(client:Client):void{...} | |
| Function | errorHandler |
| Function executed if the request failed: function(error:PlayerIOError):void{...} |
Connects the user to Player.IO via Facebook, by opening a Facebook login window where the user can enter his Facebook credentials to login to your game.
| flash.display:Stage | stage |
| A reference to the base stage of your project. | |
| String | gameId |
| Unique ID that identifies which game the client will try to connect to | |
| String | window |
| The browser window or HTML frame in which to display the document indicated by the request parameter. You can enter the name of a specific window or use one of the following values: _self, _blank, _parent, _top | |
| Array | permissions |
| What extended facebook permissions do you want access to? see: http://developers.facebook.com/docs/authentication/permissions for more info | |
| String | partnerId |
| String that identifies a possible affiliate partner. | |
| Function | callback |
| Function executed on successful connect: function(client:Client, api_key:String, uid:String, session_key:String, secret:String):void{...} | |
| Function | errorHandler |
| Function executed if the request failed: function(error:PlayerIOError):void{...} |
| flash.display:Stage | stage |
| A reference to the base stage of your project. | |
| String | gameId |
| Unique ID that identifies which game the client will try to connect to | |
| String | accessToken |
| Facebook OAuth access token | |
| String | partnerId |
| Function | callback |
| Function executed on successful connect: function(client:Client, facebookuserid:String):void{...} | |
| Function | errorHandler |
| Function executed if the request failed: function(error:PlayerIOError):void{...} |
| flash.display:Stage | stage |
| A reference to the base stage of your project. | |
| String | gameId |
| Unique ID that identifies which game the client will try to connect to | |
| String | window |
| The browser window or HTML frame in which to display the document indicated by the request parameter. You can enter the name of a specific window or use one of the following values: _self, _blank, _parent, _top | |
| Array | permissions |
| What extended facebook permissions do you want access to? see: http://developers.facebook.com/docs/authentication/permissions for more info | |
| String | partnerId |
| String that identifies a possible affiliate partner. | |
| Function | callback |
| Function executed on successful connect: function(client:Client, access_token:String, facebookuserid:String):void{...} | |
| Function | errorHandler |
| Function executed if the request failed: function(error:PlayerIOError):void{...} |
Using facebookOAuthConnectPopup to connect to Player.IO
Authenticate a user towards Kongreate
| flash.display:Stage | stage |
| A reference to the base stage of your project. | |
| String | gameid |
| Unique ID that identifies which game the client will try to connect to | |
| String | userid |
| Kongregate userid | |
| String | gameauthtoken |
| Kongreate gameauthtoken | |
| Function | callback |
| Function executed on successful connect: function(client:Client):void{...} | |
| Function | errorhandler |
| Function executed if the request failed: function(error:PlayerIOError):void{...} |
Authenticate a user towards the Player.IO simple user database
| flash.display:Stage | stage |
| A reference to the base stage of your project. | |
| String | gameid |
| Unique ID that identifies which game the client will try to connect to | |
| String | usernameOrEmail |
| Username or email of the user you wish to authenticate | |
| String | password |
| Password of the user you wish to authenticate | |
| Function | callback |
| Function executed on successful connect: function(client:Client):void{...} | |
| Function | errorhandler |
| Function executed if the request failed: function(error:PlayerIOError):void{...} |
Example of how to connect to Player.IO using simpleConnect
| String | gameId |
| Unique ID that identifies which game the client will try to connect to | |
| int | width |
| the width of the generated CAPTCHA | |
| int | height |
| the height of the generated CAPTCHA | |
| Function | callback |
| Function executed when a CAPTCHA has been successfully generated: function(captchaKey:String, captchaImageUrl:String):void{...} | |
| Function | errorHandler |
| Function executed if the request failed: function(error:PlayerIORegistrationError):void{...} |
Sends an recover password email to a user stored using the Player.IO simple user database.
| String | gameId |
| Unique ID that identifies which game the client will try to connect to | |
| String | usernameOrEmail |
| Username or email of the user that wishes to recover their passsword | |
| Function | callback |
| Function executed on successful sending of recover email: function():void{...} | |
| Function | errorHandler |
| Function executed if the request failed: function(error:PlayerIOError):void{...} |
Creates a user in the Player.IO simple user database
| flash.display:Stage | stage |
| A reference to the base stage of your project. | |
| String | gameid |
| Unique ID that identifies which game the client will try to connect to | |
| String | username |
| Username of the user you wish to create | |
| String | password |
| Password of the user you wish to create | |
| String | |
| Email of the user you wish to create (This field can be optional)( | |
| String | captchaKey |
| Used if CAPTCHA is enabled. This value is the key returned from simpleGetCaptcha | |
| String | captchaValue |
| Used if CAPTCHA is enabled. Should be what the users sees on the CAPTCHA image. | |
| Object | extraData |
| Extra data attached to the user on creation | |
| String | partnerId |
| String that identifies a possible affiliate partner. | |
| Function | callback |
| Function executed on successful connect: function(client:Client):void{...} | |
| Function | errorhandler |
| Function executed if the request failed: function(error:PlayerIORegistrationError):void{...} |