/*(r =>  
    {  
        Deployment.Current.Dispatcher.BeginInvoke(() =>  
        {  
            if (r.HasError)  
            {  
                MessageBox.Show(r.Error.Message);  
            }  
            else  
            {
                _webBrowser = new WebBrowser();
                _webBrowser.IsScriptEnabled = true;

                frob = r.Result;
                MessageBox.Show(frob);
                            
                /*string url = flicker.AuthCalcUrl(frob, FlickrNet.AuthLevel.Write);
                Uri uri = new Uri(url);
                container.Children.Add(_webBrowser);
                _webBrowser.Navigated += userLogin_Navigated;
                _webBrowser.Navigate(uri); */
        //           }  
        //     });  
        //})); */


        /// <summary>
        /// authentication token
        /// <summary>
        public void getFlickerAuthenticationToken()
        {
            Flickr flicker = new Flickr(flickrKey, flickrSecret);

            try
            {
                // use the temporary Frob to get the authentication
                flicker.AuthGetTokenAsync(frob, 
                    (token =>  
                {  
                    Deployment.Current.Dispatcher.BeginInvoke(() =>  
                    {  
                        if (token.HasError)  
                        {  
                            MessageBox.Show(token.Error.Message);  
                        }  
                        else  
                        {
                            MessageBox.Show("successfully authenticated");                          
                        }  
                    });  
                }));
                
            }
            catch (FlickrException ex)
            {
                MessageBox.Show("authentication unsuccessful");                          
                
            }

        }