public unsafe static long $Invoke0(long instance, long *args) { FacebookNativeController.APICall(Marshal.PtrToStringUni(*(IntPtr *)args), (HttpMethod)(*(int *)(args + 1)), (Action <IGraphResult>)GCHandledObjects.GCHandleToObject(args[2]), (Dictionary <string, string>)GCHandledObjects.GCHandleToObject(args[3])); return(-1L); }
protected bool APIcallback(string url, HttpMethod method, Action <Dictionary <string, object>, string> callback, Dictionary <string, string> formData = null) { if (!FacebookManager.IsLoggedIn) { callback.Invoke(null, "User is not Logged in"); return(false); } bool result; try { FacebookNativeController.APICall(url, method, delegate(IGraphResult response) { Dictionary <string, object> dictionary = null; string text2 = string.Empty; if (response != null && string.IsNullOrEmpty(response.Error)) { try { dictionary = (Json.Deserialize(response.RawResult) as Dictionary <string, object>); if (dictionary == null) { text2 = string.Format("[FacebookManager] - GetGenericAPIcall: No reponse received?!?! for url: {0} - {1}", new object[] { url, response.RawResult }); Debug.LogWarning(text2); } goto IL_AC; } catch (Exception ex2) { text2 = string.Format("[FacebookManager] - GetGenericAPIcall: raw response {0}, error: {1}", new object[] { response.RawResult, ex2.get_Message() }); Debug.LogWarning(text2); goto IL_AC; } } text2 = string.Format("[FacebookManager] - GetGenericAPIcall: returns url: {0} with error: {1}", new object[] { url, response.Error }); Debug.LogWarning(text2); IL_AC: callback.Invoke(dictionary, text2); }, formData); result = true; } catch (Exception ex) { string text = string.Format("[FacebookManager] - GetGenericAPIcall: exception caught: {0}", new object[] { ex.get_Message() }); Debug.LogError(text); if (callback != null) { callback.Invoke(null, text); } result = false; } return(result); }