|
|
|
|
|
FBRequest (Function) In french: FBRequête Sends an 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 FBStartSession(Cnt_FACEBOOK) THEN
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
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 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). Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|