PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Starting the session
  • Characteristics of the session
  • Stopping the session
  • Application in the background: Android 10 specific case
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
Used to authenticate and log in to Faceboook.
AndroidiPhone/iPad This function is not available in the simulator.
Example
MySession is fbSession
MySession..AppID = "1702546803104741"
MySession..AppSecret = "badf00ddeadbeefbadc0deoff1ce8ecd"
MySession..Permission = [fbInfoProfile, fbEmail]
IF FBStartSession(MySession) THEN
Info("Connected")
END
Syntax
<Result> = FBStartSession(<Session>)
<Result>: Boolean
  • True if the connection was established,
  • False otherwise.
<Session>: fbSession variable
Name of fbSession variable corresponding to the connection to initialize.
Remarks

Starting the session

  • FBStartSession is used to authenticate toward a Facebook server. This function initializes the connection with the server and it must be called before any communication with Facebook.
  • iPhone/iPad The function is using the Facebook account entered by the user on the phone (if this account is specified).
  • Android A single session can be started at a time. If FBStartSession is called while a session is already opened, the previous session will be stopped.
  • FBStartSession must be called from the main thread of the application.
Android

Characteristics of the session

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.

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.
Versions 25 and later
Android

Application in the background: Android 10 specific case

From Android 10, it is no longer possible to open a window when the application is in the background.
FBStartSession can open a window. If this function is used while the application is in the background, a fatal error will occur.
Tips:
  • It is possible to determine if the application is in the background using InBackgroundMode.
  • If an application needs to interact with the user while it is in the background, the solution is to display a notification (via the Notification type). When the notification is clicked on, the application will be brought back to the foreground if ..ActivateApplication is set to True. It is also possible to open a window from the procedure passed to ..ActionClick.
New in version 25
Android

Application in the background: Android 10 specific case

From Android 10, it is no longer possible to open a window when the application is in the background.
FBStartSession can open a window. If this function is used while the application is in the background, a fatal error will occur.
Tips:
  • It is possible to determine if the application is in the background using InBackgroundMode.
  • If an application needs to interact with the user while it is in the background, the solution is to display a notification (via the Notification type). When the notification is clicked on, the application will be brought back to the foreground if ..ActivateApplication is set to True. It is also possible to open a window from the procedure passed to ..ActionClick.
Android

Application in the background: Android 10 specific case

From Android 10, it is no longer possible to open a window when the application is in the background.
FBStartSession can open a window. If this function is used while the application is in the background, a fatal error will occur.
Tips:
  • It is possible to determine if the application is in the background using InBackgroundMode.
  • If an application needs to interact with the user while it is in the background, the solution is to display a notification (via the Notification type). When the notification is clicked on, the application will be brought back to the foreground if ..ActivateApplication is set to True. It is also possible to open a window from the procedure passed to ..ActionClick.
Business / UI classification : Business Logic
Component : wd250ggl.dll
Minimum version required
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment