Add a GetGraphNode or similar function to FacebookService.
Right now we have to type:
var req = s.CreateRequest (
"GET",
new Uri ("https://graph.facebook.com/598072388?fields=friends.fields(first_name,name,gender,updated_time)"),
account);
var resp = await req.GetResponseAsync ();
var json = JsonObject.Parse (resp.GetResponseText ());
It would be nice to get that down to 1 line:
public static async Task<JsonObject> GetGraphLinkAsync (this FacebookService facebook, string link, Account account)
{
var req = facebook.CreateRequest (
"GET",
new Uri (link),
account);
using (var resp = await req.GetResponseAsync ()) {
return (JsonObject)JsonObject.Parse (resp.GetResponseText ());
}
}
public static async Task<JsonObject> GetGraphAsync (this FacebookService facebook, string query, Account account)
{
var req = facebook.CreateRequest (
"GET",
new Uri ("https://graph.facebook.com/" + query),
account);
using (var resp = await req.GetResponseAsync ()) {
return (JsonObject)JsonObject.Parse (resp.GetResponseText ());
}
}
Add a GetGraphNode or similar function to FacebookService.
Right now we have to type:
It would be nice to get that down to 1 line: