PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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
Performs a communication request (HTTP request) to the Facebook Graph API.
Versions 22 and later
WEBDEV - Server codeLinux This function is now available for the 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 the 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 the WEBDEV sites in Linux.
WEBDEV - Server codeWindows This function is now available for the WEBDEV sites in Windows.
Example
Cnt_FACEBOOK is fbSession
FBRequestResult is Variant
sJSON is Buffer

Cnt_FACEBOOK..AppID = "FACEBOOK_APP_ID"
Cnt_FACEBOOK..AppSecret = "FACEBOOK_APP_SECRET"
Cnt_FACEBOOK..Permission = [fbInfoProfile]

IF FBStartSession(Cnt_FACEBOOK) THEN

// Interrogate Facebook to retrieve the user
// (equivalent to FBGetUserInformation)
sJSON = FBRequest(Cnt_FACEBOOK, "https://graph.facebook.com/me?fields=id,name")

IF sJSON <> "" THEN
FBRequestResult = JSONToVariant(sJSON)
Info(FBRequestResult.id, FBRequestResult.name)
ELSE
Error(ErrorInfo())
END

// Interrogate Facebook to retrieve the notifications
sJSON = FBRequest(Cnt_FACEBOOK, "https://graph.facebook.com/me/notifications?limit=0")

IF sJSON <> "" THEN
FBRequestResult = JSONToVariant(sJSON)
Info(FBRequestResult.summary.unseen_count, FBRequestResult.summary.updated_time)
ELSE
Error(ErrorInfo())
END
ELSE
Error("Unable to connect.", ErrorInfo())
END
Syntax
<Result> = FBRequest(<Session> , <Request> [, <Type> [, <Data>]])
<Result>: Buffer
Result of request.
<Session>: fbSession variable
Name of fbSession variable corresponding to the Facebook connection to use.
<Request>: Character string (with quotes)
Full URL of request (including the parameters stored in the URL if necessary).
<Type>: Optional Integer constant
Type of HTTP request to send:
httpDeleteDELETE method.
httpGet
(default value)
GET method.
httpPostPOST method.
httpPutPUT method.
<Data>: Optional buffer
Data to send onto the server (for a POST or PUT request only).
Components
WINDEVWEBDEV - Server codeReports and Queries wd230ggl.dll
Linux wd230ggl.so
Android wd230android.jar
Minimum required version
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment