Package | com.davikingcode.nativeExtensions.googlePlus |
Class | public class GooglePlus |
Inheritance | GooglePlus flash.events.EventDispatcher |
Method | Defined By | ||
---|---|---|---|
GooglePlus | |||
debuggerHelper():String
Android only! Print into the DDMS or Device Monitor the SHA1 key and the
package that must be set inside the Google+ console. | GooglePlus | ||
disconnect():void
Disconnects the user from the app and revokes previous authentication. | GooglePlus | ||
getAuth():void
Get the authentification token. | GooglePlus | ||
[static] | GooglePlus | ||
getUserID():String
Get the user id, only works if you logged with extended set to true. | GooglePlus | ||
getUserInfo():void
Get all the informations about the identified user. | GooglePlus | ||
getUserMail():String
Grab the user mail, only works if you logged with extended set to true. | GooglePlus | ||
isAuthenticated():Boolean | GooglePlus | ||
login(iOSKey:String, extended:Boolean = false):void
Login to the Google+ account user. | GooglePlus | ||
share(text:String, url:String, bitmapData:BitmapData = null):void
Share a prefilled text with an url and an image. | GooglePlus |
GooglePlus | () | Constructor |
public function GooglePlus()
debuggerHelper | () | method |
public function debuggerHelper():String
Android only! Print into the DDMS or Device Monitor the SHA1 key and the package that must be set inside the Google+ console.
ReturnsString — a String that contains your SHA1 key!
|
disconnect | () | method |
public function disconnect():void
Disconnects the user from the app and revokes previous authentication. If the operation succeeds, the OAuth 2.0 token is also removed from keychain.
Dispatch GooglePlusEvent.DISCONNECTED
on success.
getAuth | () | method |
public function getAuth():void
Get the authentification token. Listen to GooglePlusEvent.TOKEN
and read informations
.
getInstance | () | method |
getUserID | () | method |
public function getUserID():String
Get the user id, only works if you logged with extended set to true.
ReturnsString |
getUserInfo | () | method |
public function getUserInfo():void
Get all the informations about the identified user. Listen to GooglePlusEvent.USER_INFO
and read informations
as a stringified JSON.
getUserMail | () | method |
public function getUserMail():String
Grab the user mail, only works if you logged with extended set to true.
ReturnsString |
isAuthenticated | () | method |
public function isAuthenticated():Boolean
ReturnsBoolean |
login | () | method |
public function login(iOSKey:String, extended:Boolean = false):void
Login to the Google+ account user. On iOS If the user doesn't have the Google+ app, the login is done via the Google+ website. Then the user is redirected to its app if the login process is cancelled or completed. On Android it opens a popin.
Parameters
iOSKey:String — The client ID of the app from the Google APIs console (for iOS only). Not considered on Android.
| |
extended:Boolean (default = false ) — If true we can read user's mail, user's ID and know who you are on Google+.
|
share | () | method |
public function share(text:String, url:String, bitmapData:BitmapData = null):void
Share a prefilled text with an url and an image. Will dispatch a GooglePlusEvent.POST_SHARED on success or GooglePlusEvent.POST_NOT_SHARED if user canceled.
Parameters
text:String — Sets the text to prefill user's comment in the share dialog.
| |
url:String — The URL to share.
| |
bitmapData:BitmapData (default = null ) — A bitmapData you want to share.
|