To get a Facebook graph of a facebook account, first make the request:
Function btnRetrieve_onclick()
$.getJSON("https://graph.facebook.com/" & txtId.value, "callback=?", gotResult)
End Function
$getJSON is a wrapper for an Ajax call
We put the name of the person we want in the URL
We supply the name of the function to call on return ("gotResult").
This is an asynchronous call: we can do other things while waiting for the result.
Function gotResult(data)
txtData.value = ""
If data["error"] Then
txtData.value = data.error.message
Else
For Each item in data
txtData.value = txtData.value & Eval("item") & ": " & item & vbCRLF
Next
End If
End Function
The data returned will be a JSON object, stored in data.
This code dumps the name and value of the fields in data.