PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Starting 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/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Used to authenticate and log in to Faceboook.
Versions 22 and later
Linux This function is now available for WEBDEV sites in Linux.
Windows This function is now available for WEBDEV sites in Windows.
New in version 22
Linux This function is now available for WEBDEV sites in Linux.
Windows This function is now available for WEBDEV sites in Windows.
Linux This function is now available for WEBDEV sites in Linux.
Windows This function is now available for WEBDEV sites in Windows.
Example
MaSession is fbSession
MaSession.AppID = "1702546803104741"
MaSession.AppSecret = "badf00ddeadbeefbadc0deoff1ce8ecd"
MaSession.Permission = [fbInfoProfile, fbEmail]
IF FBStartSession(MaSession) THEN
Info("Connecté")
END
Syntax

Authentification synchrone Hide the details

<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.
WINDEVLinux

Authentification asynchrone Hide the details

FBStartSession(<Session> , <WLanguage procedure>)
<Session>: fbSession variable
Name of fbSession variable corresponding to the connection to initialize.
<WLanguage procedure>: Procedure name
Name of the Procedure WLanguage (also called "callback") called on connection. This procedure has the following format:
<Nom de la procédure>(Connexion, Session)
where:
  • <Connection> is:
    • True if the connection was established,
    • False otherwise.
  • <Session> is an Variable of type fbSession corresponding to the initialized connection.
Remarks

Starting the session

  • The FBStartSession function is used to authenticate to 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.
  • The FBStartSession function must only be called from the main the thread of the application.

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.
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 line of code 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:
// Permet de gérer la cohabitation de l'ActiveX IE et de .NET
API("OLE32", "CoInitializeEx", Null, 2)
Business / UI classification: Business Logic
Component: wd270ggl.dll
Minimum version required
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment