public void Logout() { if (FacebookNativeController.m_NativeLogout != null) { FacebookNativeController.m_NativeLogout(); } }
public void PostVideoToWall(string link, string linkName, string linkCaption, string pictureURL) { if (FacebookNativeController.m_NativePostToWall != null) { FacebookNativeController.m_NativePostToWall(link, linkName, linkCaption, pictureURL); } }
public void InviteFriends(string message, string title, FacebookInviteCompleteDelegate callback) { if (FacebookNativeController.m_NativeInviteFriends != null) { FacebookNativeController.m_NativeInviteFriends(message, title, callback); } }
public string getAccessToken() { if (FacebookNativeController.m_NativeGetAccessToken != null) { return(FacebookNativeController.m_NativeGetAccessToken()); } return(""); }
public string getUserId() { if (FacebookNativeController.m_NativeGetUserID != null) { return(FacebookNativeController.m_NativeGetUserID()); } return(""); }
public void GetSelfData(FacebookGetSelfDataCompleteDelegate callback) { Dictionary <string, object> data = new Dictionary <string, object>(); if (FacebookNativeController.m_NativeGetSelfData != null) { data = FacebookNativeController.m_NativeGetSelfData(); } callback(data); }
public void Login(FacebookDelegate loginSuccessCallback, FacebookDelegate loginFailCallback) { if (FacebookNativeController.m_NativeLogin != null) { FacebookNativeController.m_NativeLogin(loginSuccessCallback, loginFailCallback); return; } if (loginFailCallback != null) { loginFailCallback(); } }
public static void APICall(string url, HttpMethod method, Action <IGraphResult> callback, Dictionary <string, string> formData = null) { if (FacebookNativeController.m_APINativeCall != null) { FacebookNativeController.m_APINativeCall(url, method, delegate(GraphResult response) { response.DownloadTexture(callback); }, formData); return; } callback.Invoke(new GraphResult("Not available", null)); }
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); }