Facebook.FacebookApi.Call C# (CSharp) Method

Call() private method

Makes a Facebook Graph API Call.
private Call ( string relativePath, HttpVerb httpVerb, string>.Dictionary args ) : JsonObject
relativePath string The path for the call, /// e.g. /username
httpVerb HttpVerb The HTTP verb to use, e.g. /// GET, POST, DELETE
args string>.Dictionary A dictionary of key/value pairs that /// will get passed as query arguments.
return JsonObject
        private JsonObject Call(string relativePath,
                                HttpVerb httpVerb,
                                Dictionary<string, string> args)
        {
            relativePath = (relativePath ?? String.Empty).TrimStart('/');
            var url = GetApiBaseUrl(relativePath) + relativePath;

            if (args == null)
                args = new Dictionary<string, string>();
            if (!string.IsNullOrEmpty(AccessToken))
                args["access_token"] = AccessToken;
            if (url.StartsWith("https://api"))
                args["format"] = "json";

            string tmp;
            var obj = JsonObject.CreateFromString(Request(url,
                                                              httpVerb,
                                                              args,
                                                              out tmp), Culture);
            if (obj.IsDictionary)
                ThrowIfError(obj);
            return obj;
        }