title: How Can I post a status update to facebook from my WP7 App?
body: <p>Hi Im writing an app that allows users to post status updates from within the application, I believe that ive got the authentication working correctly for the login, I just dont know how to go about posting a status update. Any code/examples/tutorials of how to go about doing this would be fantastic, here is the code that I have so far for the authentication. </p>
  
  <pre><code>public partial class FacebookAuth : PhoneApplicationPage
          {
              private string _accessToken;
              private WebBrowser _webBrowser;
  
              public FacebookAuth()
              {
                  InitializeComponent();
                  _webBrowser = new WebBrowser();
                  this.Loaded += new RoutedEventHandler(FacebookAuthPage_Loaded);
              }
  
              void FacebookAuthPage_Loaded(object sender, RoutedEventArgs e)
              {
                  //Get this from the facebook
                  string appId = "XXXXXXXXXXXXXXX";
                  string[] extendedPermissions = new[] { "publish_stream", "offline_access", "user_groups" };
  
                  var oauth = new FacebookOAuthClient { AppId = appId };
                  //Telling the Facebook that we want token as response
                  //and we are using touch enabled device
                  var parameters = new Dictionary&lt;string, object&gt;
                          {
                              { "response_type", "token" },
                              { "display", "touch" }
                          };
                  //If there's extended permissions build the string and set it up
                  if (extendedPermissions != null &amp;&amp; extendedPermissions.Length &gt; 0)
                  {
                      var scope = new StringBuilder();
                      scope.Append(string.Join(",", extendedPermissions));
                      parameters["scope"] = scope.ToString();
                  }
                  //Create the login url
                  var loginUrl = oauth.GetLoginUrl(parameters);
                  //Add webBrowser to the contentPanel
                  ContentPanel.Children.Add(_webBrowser);
                  _webBrowser.Navigated += webBrowser_Navigated;
                  //Open the facebook login page into the browser
                  _webBrowser.Navigate(loginUrl);
              }
  
              void webBrowser_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e)
              {
                  FacebookOAuthResult result;
                  //Try because there might be cases when user input wrong password
                  if (FacebookOAuthResult.TryParse(e.Uri.AbsoluteUri, out result))
                  {
                      if (result.IsSuccess)
                      {
                          _accessToken = result.AccessToken;
                          MessageBox.Show(_accessToken);
                          //Hide the browser controller
                          _webBrowser.Visibility = System.Windows.Visibility.Collapsed;
                      }
                      else
                      {
                          var errorDescription = result.ErrorDescription;
                          var errorReason = result.ErrorReason;
                          MessageBox.Show(errorReason + " " + errorDescription);
                      }
                  }
              }
  
              private void PostBtn_Click(object sender, RoutedEventArgs e)
              {
  
              }
          }
      }
  </code></pre>