Skip to content

Instantly share code, notes, and snippets.

@prabirshrestha
Created May 22, 2012 19:41
Show Gist options
  • Save prabirshrestha/2771161 to your computer and use it in GitHub Desktop.
Save prabirshrestha/2771161 to your computer and use it in GitHub Desktop.
general api
var fb = new FacebookApi();
dynamic result = await fb.ApiAsync(
method: "GET"
path: "me/feed",
parameters: new { fields= new[] {"id", "name"},
cancel: CancellationToken.None,
onUploadProgress:null, // IProgress<Tuple <long,byte[]>> -> totalBytesReceived, byteBuffer
onDownloadProgress: null);
var headers = result.headers;
var code = result.code; // status code
if(code != 304) {
var content = result.content; // string content
var body = result.body; // json object/ xml object or .....
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment