PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Properties specific to the description of fbSession variables
  • Closing the session
  • WLanguage functions that use a variable of type fbSession
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The fbSession type is used to describe a connection to the Facebook service and to manage the authentication to this service. The characteristics of this connection can be defined and changed using different WLanguage properties.
Important: Before using this WLanguage type, the application must be declared to Facebook. For more details, see Using Facebook authentication.
Remarks:
  • For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
  • This type of variable is available in Linux only for WEBDEV sites.
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.
EmailCharacter stringEmail of the end user (may be used to fill the connection dialog beforehand).
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.
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.

Closing the session

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

WLanguage functions that use a variable of type fbSession

Minimum version required
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment