FB.Connect

Description

Collection of most methods needed for a Facebook Connect site. This class is not intended to be instantiated.

Use these methods for users to log in and log out of a Connect site, displaying permissions and request forms to users, and publishing information to a user's stream.

Methods

addSignedPublicSessionDataToUrl(String url,  Function callback)

Get signed public session data and add it to the given url as query parameter 'public_session_data'.

createApplication(String name,  Function callback)

Prompts the user to create their own application.

forceSessionRefresh(Function callback)

Forces the current login session to refresh from login_status.

getSignedPublicSessionData(Function callback)

Get a session proof structure that can be passed to another app as proof of a user session.

get_loggedInUser()

Returns the uid of the currently logged in user.

get_status()

Get the current user's login status as a Waitable object.

ifUserConnected(Object connectedArg,  Object notConnectedArg)

Use this function to take action depending on whether the user has already connected with your application.

inviteConnectUsers()

Method for prompting the user to invite their friends to connect their accounts.

logout(Function callback)

Log user out of current session as well as Facebook.

logoutAndRedirect(String redirectUrl)

Log user out from this session and Facebook, then redirect to the specified url.

pollLoginStatus(Number pollInterval,  Number pollTries,  Function callback)

This polls login status until you are connected, or timeout.

requireSession(Function callback,  Function onCancelCallback,  Boolean isUserActionHint)

Call this function when you want to enforce that the current user is logged into Facebook.

showAddFriendDialog(Number target_id,  Function callback)

Method for prompting the user with a dialog to add a friend.

showAddSectionButton(String section,  Object element)

Creates a button that can be clicked in order to prompt the user to add a profile box or info section.

showBookmarkDialog(Function callback)

Provides an iFrame popup allowing the user to bookmark an application.

showFeedDialog(String template_bundle_id,  Object template_data,  Array target_id,  String body_general,  FB.FeedStorySize story_size,  FB.RequireConnect require_connect,  Function callback,  String user_message_prompt,  Object user_message)

This call lets a user publish a Feed story to his or her Wall or to one of his or her friends' Walls.

showPermissionDialog(String permissions,  Function callback,  Boolean enableProfileSelector,  Array profileSelectorIds)

Method for prompting the user to grant the application one or more extended permissions.

showShareDialog(String url,  Function callback)
streamPublish(String user_message,  Object attachment,  Object action_links,  String target_id,  String user_message_prompt,  Function callback,  Boolean auto_publish,  String actor_id)

This method publishes a post to the user's stream using stream.publish.