|
|
|
|
|
<fbSession variable>.Request (Function) In french: <Variable fbSession>.Requête Performs a communication request (HTTP request) to the Facebook Graph API.
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 Cnt_FACEBOOK.Open() THEN  // Interrogate Facebook to retrieve the user // (equivalent to FBGetUserInformation) sJSON = Cnt_FACEBOOK.Request("https://graph.facebook.com/me?fields=id,name")  IF sJSON <> "" THEN FBRequestResult = sJSON.ToVariant() Info(FBRequestResult.id, FBRequestResult.name) ELSE Error(ErrorInfo()) END  // Interrogate Facebook to retrieve the notifications sJSON = Cnt_FACEBOOK.Request("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> = <Session>.Request(<Request> [, <Type> [, <Data>]])
<Result>: Buffer Result of the request. <Session>: fbSession variable Name of the fbSession variable corresponding to the Facebook connection to handle. <Request>: Character string Full URL of the request (including the parameters stored in the URL if necessary). <Type>: Optional Integer constant Type of HTTP request to send: | | httpDelete | DELETE method. | httpGet (default value) | GET method. | httpPost | POST method. | httpPut | PUT method. |
<Data>: Optional buffer Data to send to the server (for a POST or PUT request only).
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|