public FacebookInfoPage()
        {
            sdk = new sdkmap();
            //sdk.GetLocation();
            sdk.ShowMyLocationOnTheMap2();

            InitializeComponent();
        }
 public FacebookInfoPage()
 {
     sdk = new sdkmap();
     //sdk.GetLocation();
     sdk.ShowMyLocationOnTheMap2();
 
     InitializeComponent();
 }
        public void Post_Without_Click()
        {
            sdk.ShowMyLocationOnTheMap2();
            make_string_for_address();
            make_string_for_image();
            txtMessage.Text = "";
            StreamReader streamReader = new StreamReader(@"msgfb");
            string       var          = streamReader.ReadLine();

            txtMessage.Text = txtMessage.Text + var + final_image + final_xml;
            if (string.IsNullOrEmpty(txtMessage.Text))
            {
                MessageBox.Show("Enter message.");
                return;
            }
            //MessageBox.Show(txtMessage.Text);


            var fb = new FacebookClient(_accessToken);

            fb.PostCompleted += (o, args) =>
            {
                if (args.Error != null)
                {
                    Dispatcher.BeginInvoke(() => MessageBox.Show(args.Error.Message));
                    return;
                }

                var result = (IDictionary <string, object>)args.GetResultData();
                _lastMessageId = (string)result["id"];

                Dispatcher.BeginInvoke(() =>
                {
                    // MessageBox.Show("Message Posted successfully");

                    txtMessage.Text = string.Empty;
                    btnDeleteLastMessage.IsEnabled = true;
                });
            };

            var parameters = new Dictionary <string, object>();

            parameters["message"] = txtMessage.Text;

            fb.PostAsync("me/feed", parameters);
            NavigationService.Navigate(new Uri("/panic_mode.xaml", UriKind.Relative));
        }