PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Starting the session
  • Characteristics of the session
  • Stopping the session
  • Incompatibility between the IE ActiveX (and oAuth2) and the use of .NET assembly
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.
Versions 25 and later
AndroidiPhone/iPad This function is available in the simulator.
New in version 25
AndroidiPhone/iPad This function is available in the simulator.
AndroidiPhone/iPad This function is available in the simulator.
Versions 22 and later
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
WEBDEV - Server codeWindows This function is now available for the WEBDEV sites in Windows.
New in version 22
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
WEBDEV - Server codeWindows This function is now available for the WEBDEV sites in Windows.
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
WEBDEV - Server codeWindows This function is now available for the WEBDEV sites in Windows.
Example
MySession is fbSession
MySession..AppID = "1702546803104741"
MySession..AppSecret = "badf00ddeadbeefbadc0deoff1ce8ecd"
MySession..Permission = [fbInfoProfile, fbEmail]
IF MySession.Start() THEN
Info("Connected")
END
 
Syntax
<Result> = <Session>.Start()
<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

  • <fbSession variable>.Start 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.
  • WINDEV A window allowing the user to type his login and password is automatically opened.
  • 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 <fbSession variable>.Start is called while a session is already opened, the previous session will be stopped.
  • <fbSession variable>.Start 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 <fbSession variable>.Start, this permission will be automatically requested.

Stopping the session

A started Facebook session is a persistent session: it will remain opened:
WINDEV

Incompatibility between the IE ActiveX (and oAuth2) and the use of .NET assembly

When an HTML control is used in WINDEV, this control is using the system "Microsoft Web browser" ActiveX. This ActiveX is also used by WINDEV for all OAuth2 authentications (Facebook, Twitter, Google, etc.) that require a validation for the connection via HTML code.
If an HTML control (or an OAuth2 authentication) and a ".Net"assembly are used in the same project, an incompatibility may occur between the .NET layers of Microsoft and the ActiveX.
An API can be used to manage this cohabitation. To do so, the following code line must be used in the initialization code of the project or in the initialization code of classes or global procedure if the ".Net" object is initialized in the class or in the set of procedures:
// Used to manage the cohabitation between IE ActiveX and .NET
API("OLE32", "CoInitializeEx", Null, 2)
Component : wd250ggl.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment