Skip to content

Instantly share code, notes, and snippets.

@boarnoah
Created April 6, 2016 16:42
Show Gist options
  • Save boarnoah/d7ef00971616ffe128f61aa9a59f7b15 to your computer and use it in GitHub Desktop.
Save boarnoah/d7ef00971616ffe128f61aa9a59f7b15 to your computer and use it in GitHub Desktop.
//INSERT WITH THE OTHER METHODS:
- name: setLoginBehavior
summary: |
Sets the behaviour that the module will attempt to use for authorize().
description: |
Be sure to set this before calling authorize if this is needed. It is
recommended to follow Facebook's [guidelines](https://developers.facebook.com/blog/post/2015/10/29/Facebook-Login-iOS9)
for ideal login behavior
type: Number
constants: [LOGIN_BEHAVIOR_*]
default:
Defaults to <Titanium.Modules.Facebook.LOGIN_BEHAVIOR_NATIVE_WITH_FALLBACK>
on Android and <Titanium.Modules.Facebook.LOGIN_BEHAVIOR_NATIVE> on iOS
(identical to the Android default).
since: "5.4.0"
availability: creation
platforms: [android, iphone, ipad]
//INSERT WITH THE PROPERTIES(?):
- name: LOGIN_BEHAVIOR_BROWSER
summary: |
Opens login window in the default Web Browser (Safari/Firefox etc...)
type: Number
permission: read-only
since: "5.4.0"
platforms: [android, iphone, ipad]
- name: LOGIN_BEHAVIOR_NATIVE
summary: |
Opens login window with the native Facebook app. On iOS it will attempt to
fallback to <Titanium.Modules.Facebook.LOGIN_BEHAVIOR_BROWSER> if the Facebook app
is not installed. For Android use <Titanium.Modules.Facebook.LOGIN_BEHAVIOR_NATIVE_WITH_FALLBACK>
to get this behavior.
type: Number
permission: read-only
since: "5.4.0"
platforms: [android, iphone, ipad]
- name: LOGIN_BEHAVIOR_SYSTEM_ACCOUNT
summary: |
Attempts to login with through the Facebook account currently signed in through
Settings.
type: Number
permission: read-only
since: "5.4.0"
platforms: [iphone, ipad]
- name: LOGIN_BEHAVIOR_WEB
summary: |
Opens login window through a modal browser window.
type: Number
permission: read-only
since: "5.4.0"
platforms: [iphone, ipad]
- name: LOGIN_BEHAVIOR_NATIVE_WITH_FALLBACK
summary: |
Opens login window with the native Facebook app. On Android it will attempt to
fallback to <Titanium.Modules.Facebook.LOGIN_BEHAVIOR_BROWSER> if the Facebook app
is not installed. For iOS use <Titanium.Modules.Facebook.NATIVE> to get this behavior.
type: Number
permission: read-only
since: "5.4.0"
platforms: [Android]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment