Difference between revisions of "Facebook"

From GiderosMobile
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 +
<languages />
 
<!-- GIDEROSOBJ:Facebook -->
 
<!-- GIDEROSOBJ:Facebook -->
 
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]]<br/>
 
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]]<br/>
Line 20: Line 21:
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Methods</translate> ===
 
=== <translate>Methods</translate> ===
[[Special:MyLanguage/Facebook:authorize|Facebook:authorize]] <br/><!-- GIDEROSMTD:Facebook:authorize -->
+
[[Special:MyLanguage/Facebook:authorize|Facebook:authorize]] <br/><!-- GIDEROSMTD:Facebook:authorize(permissions)  -->
[[Special:MyLanguage/Facebook:dialog|Facebook:dialog]] <br/><!-- GIDEROSMTD:Facebook:dialog -->
+
[[Special:MyLanguage/Facebook:dialog|Facebook:dialog]] <br/><!-- GIDEROSMTD:Facebook:dialog(action,paramaters)  -->
[[Special:MyLanguage/Facebook:extendAccessToken|Facebook:extendAccessToken]] <br/><!-- GIDEROSMTD:Facebook:extendAccessToken -->
+
[[Special:MyLanguage/Facebook:extendAccessToken|Facebook:extendAccessToken]] <br/><!-- GIDEROSMTD:Facebook:extendAccessToken()  -->
[[Special:MyLanguage/Facebook:extendAccessTokenIfNeeded|Facebook:extendAccessTokenIfNeeded]] <br/><!-- GIDEROSMTD:Facebook:extendAccessTokenIfNeeded -->
+
[[Special:MyLanguage/Facebook:extendAccessTokenIfNeeded|Facebook:extendAccessTokenIfNeeded]] <br/><!-- GIDEROSMTD:Facebook:extendAccessTokenIfNeeded()  -->
[[Special:MyLanguage/Facebook:getAccessToken|Facebook:getAccessToken]] <br/><!-- GIDEROSMTD:Facebook:getAccessToken -->
+
[[Special:MyLanguage/Facebook:getAccessToken|Facebook:getAccessToken]] <br/><!-- GIDEROSMTD:Facebook:getAccessToken()  -->
[[Special:MyLanguage/Facebook:getExpirationDate|Facebook:getExpirationDate]] <br/><!-- GIDEROSMTD:Facebook:getExpirationDate -->
+
[[Special:MyLanguage/Facebook:getExpirationDate|Facebook:getExpirationDate]] <br/><!-- GIDEROSMTD:Facebook:getExpirationDate()  -->
[[Special:MyLanguage/Facebook:graphRequest|Facebook:graphRequest]] <br/><!-- GIDEROSMTD:Facebook:graphRequest -->
+
[[Special:MyLanguage/Facebook:graphRequest|Facebook:graphRequest]] <br/><!-- GIDEROSMTD:Facebook:graphRequest(graphPath,paramaters,method)  -->
[[Special:MyLanguage/Facebook:isSessionValid|Facebook:isSessionValid]] <br/><!-- GIDEROSMTD:Facebook:isSessionValid -->
+
[[Special:MyLanguage/Facebook:isSessionValid|Facebook:isSessionValid]] <br/><!-- GIDEROSMTD:Facebook:isSessionValid()  -->
[[Special:MyLanguage/Facebook:logout|Facebook:logout]] <br/><!-- GIDEROSMTD:Facebook:logout -->
+
[[Special:MyLanguage/Facebook:logout|Facebook:logout]] <br/><!-- GIDEROSMTD:Facebook:logout()  -->
[[Special:MyLanguage/Facebook:setAccessToken|Facebook:setAccessToken]] <br/><!-- GIDEROSMTD:Facebook:setAccessToken -->
+
[[Special:MyLanguage/Facebook:setAccessToken|Facebook:setAccessToken]] <br/><!-- GIDEROSMTD:Facebook:setAccessToken(accessToken)  -->
[[Special:MyLanguage/Facebook:setAppId|Facebook:setAppId]] <br/><!-- GIDEROSMTD:Facebook:setAppId -->
+
[[Special:MyLanguage/Facebook:setAppId|Facebook:setAppId]] <br/><!-- GIDEROSMTD:Facebook:setAppId(appId)  -->
[[Special:MyLanguage/Facebook:setExpirationDate|Facebook:setExpirationDate]] <br/><!-- GIDEROSMTD:Facebook:setExpirationDate -->
+
[[Special:MyLanguage/Facebook:setExpirationDate|Facebook:setExpirationDate]] <br/><!-- GIDEROSMTD:Facebook:setExpirationDate(expirationDate)  -->
[[Special:MyLanguage/Facebook:shouldExtendAccessToken|Facebook:shouldExtendAccessToken]] <br/><!-- GIDEROSMTD:Facebook:shouldExtendAccessToken -->
+
[[Special:MyLanguage/Facebook:shouldExtendAccessToken|Facebook:shouldExtendAccessToken]] <br/><!-- GIDEROSMTD:Facebook:shouldExtendAccessToken()  -->
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Events</translate> ===
 
=== <translate>Events</translate> ===
[[Special:MyLanguage/Event.DIALOG_CANCEL|Event.DIALOG_CANCEL]]<br/><!-- GIDEROSEVT:Event.DIALOG_CANCEL -->
+
[[Special:MyLanguage/Event.DIALOG_CANCEL|Event.DIALOG_CANCEL]]<br/><!-- GIDEROSEVT:Event.DIALOG_CANCEL dialogCancel-->
[[Special:MyLanguage/Event.DIALOG_COMPLETE|Event.DIALOG_COMPLETE]]<br/><!-- GIDEROSEVT:Event.DIALOG_COMPLETE -->
+
[[Special:MyLanguage/Event.DIALOG_COMPLETE|Event.DIALOG_COMPLETE]]<br/><!-- GIDEROSEVT:Event.DIALOG_COMPLETE dialogComplete-->
[[Special:MyLanguage/Event.DIALOG_ERROR|Event.DIALOG_ERROR]]<br/><!-- GIDEROSEVT:Event.DIALOG_ERROR -->
+
[[Special:MyLanguage/Event.DIALOG_ERROR|Event.DIALOG_ERROR]]<br/><!-- GIDEROSEVT:Event.DIALOG_ERROR dialogError-->
[[Special:MyLanguage/Event.LOGIN_CANCEL|Event.LOGIN_CANCEL]]<br/><!-- GIDEROSEVT:Event.LOGIN_CANCEL -->
+
[[Special:MyLanguage/Event.LOGIN_CANCEL|Event.LOGIN_CANCEL]]<br/><!-- GIDEROSEVT:Event.LOGIN_CANCEL loginCancel-->
[[Special:MyLanguage/Event.LOGIN_COMPLETE|Event.LOGIN_COMPLETE]]<br/><!-- GIDEROSEVT:Event.LOGIN_COMPLETE -->
+
[[Special:MyLanguage/Event.LOGIN_COMPLETE|Event.LOGIN_COMPLETE]]<br/><!-- GIDEROSEVT:Event.LOGIN_COMPLETE loginComplete-->
[[Special:MyLanguage/Event.LOGIN_ERROR|Event.LOGIN_ERROR]]<br/><!-- GIDEROSEVT:Event.LOGIN_ERROR -->
+
[[Special:MyLanguage/Event.LOGIN_ERROR|Event.LOGIN_ERROR]]<br/><!-- GIDEROSEVT:Event.LOGIN_ERROR loginError-->
[[Special:MyLanguage/Event.LOGOUT_COMPLETE|Event.LOGOUT_COMPLETE]]<br/><!-- GIDEROSEVT:Event.LOGOUT_COMPLETE -->
+
[[Special:MyLanguage/Event.LOGOUT_COMPLETE|Event.LOGOUT_COMPLETE]]<br/><!-- GIDEROSEVT:Event.LOGOUT_COMPLETE logoutComplete-->
[[Special:MyLanguage/Event.REQUEST_COMPLETE|Event.REQUEST_COMPLETE]]<br/><!-- GIDEROSEVT:Event.REQUEST_COMPLETE -->
+
[[Special:MyLanguage/Event.REQUEST_COMPLETE|Event.REQUEST_COMPLETE]]<br/><!-- GIDEROSEVT:Event.REQUEST_COMPLETE requestComplete-->
[[Special:MyLanguage/Event.REQUEST_ERROR|Event.REQUEST_ERROR]]<br/><!-- GIDEROSEVT:Event.REQUEST_ERROR -->
+
[[Special:MyLanguage/Event.REQUEST_ERROR|Event.REQUEST_ERROR]]<br/><!-- GIDEROSEVT:Event.REQUEST_ERROR requestError-->
 
=== <translate>Constants</translate> ===
 
=== <translate>Constants</translate> ===
 
|}
 
|}

Latest revision as of 15:33, 13 September 2018


Supported platforms: Platform android.pngPlatform ios.png
Available since: Gideros 2012.09
Inherits from: EventDispatcher

Description


Facebook SDK plugin is available for only iOS as an external plugin. To use facebook module:

1. Download and install Facebook SDK from https://developers.facebook.com/ios/downloads/
2. Add FacebookSDK.framework to your project.
3. Add the backward compatibility headers as described https://developers.facebook.com/docs/howtos/feed-dialog-using-ios-sdk/#step2
4. Add {Gideros Installation Directory}/All Plugins/Facebook/source/iOS/* files to your Xcode project.
5. If enabled, disable "Application does not run in background" property in .plist file.

The Facebook class is defined in module "facebook". Therefore, you need to call
require("facebook") before using it. Loading the Facebook module
also creates a global variable facebook of type Facebook for direct use.

Methods

Facebook:authorize
Facebook:dialog
Facebook:extendAccessToken
Facebook:extendAccessTokenIfNeeded
Facebook:getAccessToken
Facebook:getExpirationDate
Facebook:graphRequest
Facebook:isSessionValid
Facebook:logout
Facebook:setAccessToken
Facebook:setAppId
Facebook:setExpirationDate
Facebook:shouldExtendAccessToken

Events

Event.DIALOG_CANCEL
Event.DIALOG_COMPLETE
Event.DIALOG_ERROR
Event.LOGIN_CANCEL
Event.LOGIN_COMPLETE
Event.LOGIN_ERROR
Event.LOGOUT_COMPLETE
Event.REQUEST_COMPLETE
Event.REQUEST_ERROR

Constants