PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Properties specific to the description of fbSession variables
  • Stopping the session
  • Functions that use a fbSession variable
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
The fbSession type is used to describe a connection to the Facebook service and to manage the authentication beside this service. The characteristics of this connection can be defined and modified by several WLanguage properties.
Important: Before using this WLanguage type, the application must be declared to Facebook. See the Using the Facebook identification page for more details.
Notes:
  • See Declaring a variable for more details.
  • Versions 22 and later
    This type of variable are available in Linux only for the WEBDEV sites.
    New in version 22
    This type of variable are available in Linux only for the WEBDEV sites.
    This type of variable are available in Linux only for the WEBDEV sites.
Versions 22 and later
WEBDEV - Server codeLinux This type of variable is now available for the WEBDEV sites in Linux.
WEBDEV - Server codeWindows This type of variable is now available for the WEBDEV sites in Windows.
New in version 22
WEBDEV - Server codeLinux This type of variable is now available for the WEBDEV sites in Linux.
WEBDEV - Server codeWindows This type of variable is now available for the WEBDEV sites in Windows.
WEBDEV - Server codeLinux This type of variable is now available for the WEBDEV sites in Linux.
WEBDEV - Server codeWindows This type of variable is now available for the WEBDEV sites in Windows.
Example
MySession is fbSession
MySession..AppID = "1702546803104741"
MySession..AppSecret = "badf00ddeadbeefbadc0deoff1ce8ecd"
MySession..Permission = [fbInfoProfile, fbEmail]
IF FBStartSession(MySession) THEN
Info("Connected")
END
Remarks

Properties specific to the description of fbSession variables

The following properties can be used to handle a Facebook session:
Property nameType usedEffect
AppIDCharacter stringIdentifier of the application supplied when declaring the Facebook application.
AppSecretCharacter stringSecret code of the application supplied when declaring the Facebook application.
AndroidiPhone/iPad This property is ignored.
EmailCharacter stringEmail of the end user (may be used to fill the connection dialog beforehand).
Android This property is ignored.
PageIDCharacter stringIdentifier of the Facebook page to open. If this parameter is empty, the session is started on a user and not on a page.
AndroidiPhone/iPad This property is not available.
PermissionArrayRights required during the Facebook connection. The rights (or permissions) to supply are defined by Facebook. The list of available rights can be consulted on the page: https://developers.facebook.com/docs/facebook-login/permissions/v2.3.
For some rights (the most common ones), you have the ability to use the following constants:
  • fbEmail: "email" permission: Used to access the first email address of a person.
  • fbInfoFriends: "user_friends" permission: Used to access the liste of friends for your application.
  • fbInfoProfile: "public_profile" permission: Used to access the public profile of a person.
Android The "public_profile" permission is always required when starting a Facebook session. If this permission was not specified in the list of permissions for the fbSession variable passed in parameter to FBStartSession, this permission will be automatically requested.

Note: These properties can be handled by using one of the following syntaxes:
  • <Variable Name>..<Property Name>
  • <Variable Name>.<Property Name>

Stopping the session

A started Facebook session is a persistent session: it will remain opened:
  • until the application is closed.
  • until the call to FBStopSession.

Functions that use a fbSession variable

Versions 21 and later
FBGetUserInformation
New in version 21
FBGetUserInformation
FBGetUserInformation
Retrieves the Facebook information of the connected user.
Versions 21 and later
FBRequest
New in version 21
FBRequest
FBRequest
Performs a communication request (HTTP request) to the Facebook Graph API.
Versions 21 and later
FBSessionStatus
New in version 21
FBSessionStatus
FBSessionStatus
Checks the status of a Facebook session.
Versions 21 and later
FBStartSession
New in version 21
FBStartSession
FBStartSession
Used to authentificate and to connect to Facebook.
Versions 21 and later
FBStopSession
New in version 21
FBStopSession
FBStopSession
Stops the Facebook session that was started by FBStartSession.
Minimum required version
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment