Methods
(static) init(options)
Initializes Parse Facebook integration. Call this function after you
have loaded the Facebook Javascript SDK with the same parameters
as you would pass to
FB.init()
. Parse.FacebookUtils will invoke FB.init() for you
with these arguments.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | Facebook options argument as described here: FB.init(). The status flag will be coerced to 'false' because it interferes with Parse Facebook integration. Call FB.getLoginStatus() explicitly if this behavior is required by your application. |
(static) isLinked(user) → {Boolean}
Gets whether the user has their account linked to Facebook.
Parameters:
Name | Type | Description |
---|---|---|
user |
Parse.User | User to check for a facebook link. The user must be logged in on this device. |
Returns:
true
if the user has their account
linked to Facebook.
- Type
- Boolean
(static) link(user, permissions, options) → {Parse.Promise}
Links Facebook to an existing PFUser. This method delegates to the
Facebook SDK to authenticate the user, and then automatically links
the account to the Parse.User.
Parameters:
Name | Type | Description |
---|---|---|
user |
Parse.User | User to link to Facebook. This must be the current user. |
permissions |
String | Object | The permissions required for Facebook log in. This is a comma-separated string of permissions. Alternatively, supply a Facebook authData object as described in our REST API docs if you want to handle getting facebook auth tokens yourself. |
options |
Object | Standard options object with success and error callbacks. |
Returns:
- Type
- Parse.Promise
(static) logIn(permissions, options) → {Parse.Promise}
Logs in a user using Facebook. This method delegates to the Facebook
SDK to authenticate the user, and then automatically logs in (or
creates, in the case where it is a new user) a Parse.User.
Parameters:
Name | Type | Description |
---|---|---|
permissions |
String | Object | The permissions required for Facebook log in. This is a comma-separated string of permissions. Alternatively, supply a Facebook authData object as described in our REST API docs if you want to handle getting facebook auth tokens yourself. |
options |
Object | Standard options object with success and error callbacks. |
Returns:
- Type
- Parse.Promise
(static) unlink(user, options) → {Parse.Promise}
Unlinks the Parse.User from a Facebook account.
Parameters:
Name | Type | Description |
---|---|---|
user |
Parse.User | User to unlink from Facebook. This must be the current user. |
options |
Object | Standard options object with success and error callbacks. |
Returns:
- Type
- Parse.Promise