GetDialogUrl() public method

Gets the Facebook dialog url.
/// If dialog or parameters is null. ///
public GetDialogUrl ( string dialog, object parameters ) : Uri
dialog string /// The dialog name. Values can be oauth, feed, pagetab, friends, pay, apprequests, and send. ///
parameters object /// The parameters. ///
return System.Uri
        /// <summary>
        /// Present Dialog asyncronizely
        /// </summary>
        /// <param name="method"></param>
        /// <param name="parameters"></param>
        /// <returns></returns>
        public static async Task<WebDialogResult> PresentDialogAsync(string method, Dictionary<string, object> parameters)
        {
            var session = FacebookSessionCacheProvider.Current.GetSessionData();
            if (session != null)
            {
                FacebookClient client = new FacebookClient();
                client.AppId = session.AppId;

                if (parameters != null && !parameters.ContainsKey("redirect_uri"))
                {
                    parameters.Add("redirect_uri", "https://www.facebook.com/connect/login_success.html");
                }
                Uri startUri = client.GetDialogUrl(method, parameters);

                Uri endUri = new Uri("https://www.facebook.com/connect/login_success.html");

                var result = await WebDialogBroker.PresentAsync(WebDialogOptions.None, startUri, endUri);

                if (result.ResponseStatus == WebDialogStatus.ErrorHttp)
                {
                    throw new InvalidOperationException();
                }
                else if (result.ResponseStatus == WebDialogStatus.UserCancel)
                {
                    throw new InvalidOperationException();
                }
                return result;
            }
            else
                return null;
        }
        private void OnInviteFriendsClicked(object sender, RoutedEventArgs e)
        {
            AppContent.Visibility = Visibility.Collapsed;
            FacebookClient client = new FacebookClient(AccessToken);
            dynamic parameters = new ExpandoObject();
            parameters.app_id = ClientId;
            parameters.message = "Invite your friends";
            parameters.title = "Invite friends";
            parameters.redirect_uri = "https://wp.qmatteoq.com/";

            Uri dialogUrl = client.GetDialogUrl("apprequests", parameters);

            RequestView.Visibility = Visibility.Visible;
            RequestView.Navigate(dialogUrl);
        }