Exemplo n.º 1
0
            public void MobileIsTrueThen_ShouldGenerateMobileLoginUrl()
            {
                var parameters = new Dictionary <string, object>();

                parameters["mobile"] = true;

                var dialogUrl = _fb.GetDialogUrl("feed", parameters);

                Assert.Equal("https://m.facebook.com/dialog/feed", dialogUrl.AbsoluteUri);
            }
Exemplo n.º 2
0
        public Task <NavigationState> InviteFriendsAsync(string friendName)
        {
            CurrentRequest = FacebookRequest.InviteRequest;

            if (_callbackHook != null || !IsLoggedIn)
            {
                ChangeNavigationState(NavigationState.Error);
                return(Task.FromResult <NavigationState>(NavigationState.Error));
            }


            var uri = _fb.GetDialogUrl("apprequests", new
            {
                to           = friendName,
                redirect_uri = RedirectUrl,
                message      = "Checkout this great game!",
                display      = "popup"
            });

            CreateTask();
            ChangeNavigationState(NavigationState.Navigating);
            _web.Navigate(uri);

            return(_callbackHook);
        }
Exemplo n.º 3
0
        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);
        }