public void GetAppLink(int requestId)
        {
            var result = MockResults.GetGenericResult(requestId, this.ResultExtras);

            this.Facebook.OnGetAppLinkComplete(new ResultContainer(result));
        }
        public void OpenFriendFinderDialog(int requestId)
        {
            var result = MockResults.GetGenericResult(requestId, this.ResultExtras);

            this.MobileFacebook.OnFriendFinderComplete(new ResultContainer(result));
        }
        public void CallStatic(string methodName, params object[] args)
        {
            this.LogMethodCall(methodName);
            Utilities.Callback <ResultContainer> callback = null;
            IDictionary <string, object>         result;
            IDictionary <string, object>         methodArguments = null;
            int callbackID = -1;

            if (args.Length == 1)
            {
                var jsonParams = (string)args[0];
                if (jsonParams != null)
                {
                    methodArguments = MiniJSON.Json.Deserialize(jsonParams) as IDictionary <string, object>;
                    string callbackStr;
                    if (methodArguments != null && methodArguments.TryGetValue(Constants.CallbackIdKey, out callbackStr))
                    {
                        callbackID = int.Parse(callbackStr);
                    }
                }
            }

            if (callbackID == -1 && methodName != "Init")
            {
                // There was no callback so just return;
                return;
            }

            if (methodName == "Init")
            {
                callback = this.MobileFacebook.OnInitComplete;
                result   = MockResults.GetGenericResult(0, this.ResultExtras);
            }
            else if (methodName == "AppInvite")
            {
                callback = this.MobileFacebook.OnAppInviteComplete;
                result   = MockResults.GetGenericResult(callbackID, this.ResultExtras);
            }
            else if (methodName == "GetAppLink")
            {
                callback = this.Facebook.OnGetAppLinkComplete;
                result   = MockResults.GetGenericResult(callbackID, this.ResultExtras);
            }
            else if (methodName == "AppRequest")
            {
                callback = this.Facebook.OnAppRequestsComplete;
                result   = MockResults.GetGenericResult(callbackID, this.ResultExtras);
            }
            else if (methodName == "FeedShare")
            {
                callback = this.Facebook.OnShareLinkComplete;
                result   = MockResults.GetGenericResult(callbackID, this.ResultExtras);
            }
            else if (methodName == "ShareLink")
            {
                callback = this.Facebook.OnShareLinkComplete;
                result   = MockResults.GetGenericResult(callbackID, this.ResultExtras);
            }
            else if (methodName == "GameGroupCreate")
            {
                callback = this.Facebook.OnGroupCreateComplete;
                result   = MockResults.GetGroupCreateResult(callbackID, this.ResultExtras);
            }
            else if (methodName == "GameGroupJoin")
            {
                callback = this.Facebook.OnGroupJoinComplete;
                result   = MockResults.GetGenericResult(callbackID, this.ResultExtras);
            }
            else if (methodName == "LoginWithPublishPermissions" || methodName == "LoginWithReadPermissions")
            {
                callback = this.Facebook.OnLoginComplete;
                string permissions;
                methodArguments.TryGetValue(AndroidFacebook.LoginPermissionsKey, out permissions);
                result = MockResults.GetLoginResult(
                    callbackID,
                    permissions,
                    this.ResultExtras);
            }
            else if (methodName == "RefreshCurrentAccessToken")
            {
                callback = this.MobileFacebook.OnRefreshCurrentAccessTokenComplete;
                result   = MockResults.GetLoginResult(
                    callbackID,
                    string.Empty,
                    this.ResultExtras);
            }
            else
            {
                throw new NotImplementedException("Not implemented for " + methodName);
            }

            callback(new ResultContainer(result));
        }