title: Posting to FB wall using Facebook C# SDK fails after July 25, 2011
body: <p>I was able to post messages to my wall through Facebook application with ASP.NET web application and Facebook C# SDK. I had a never expiring access token and it was working fine till July 25, 2011. It was reset by FB for some security related reasons. So I changed my code to get the access token on the fly using the following piece of code.</p>
  
  <pre><code>        string url = "https://graph.facebook.com/oauth/access_token?client_id=app_id&amp;client_secret=app_secret&amp;grant_type=client_credentials&amp;scope=offline_access,publish_stream";
  
          HttpWebRequest webRequest = null;
          StreamWriter requestWriter = null;
          string responseData = "";
          webRequest = System.Net.WebRequest.Create(url) as HttpWebRequest;
          webRequest.Method = "POST";
          webRequest.ServicePoint.Expect100Continue = false;
          webRequest.Timeout = 20000;
          StreamReader responseReader = null;
  
          if (webRequest.Method == "POST")
          {
              webRequest.ContentType = "application/x-www-form-urlencoded";
              //POST the data.  
              requestWriter = new StreamWriter(webRequest.GetRequestStream());
  
              requestWriter.Write(string.Empty);
  
              responseReader = new StreamReader(webRequest.GetResponse().GetResponseStream());
              responseData = responseReader.ReadToEnd();
              accessToken = responseData.Substring(responseData.IndexOf("=") + 1, responseData.Length - responseData.IndexOf("=") - 1);
          }
  </code></pre>
  
  <p>and I perform the posting by using</p>
  
  <pre><code>        if (accessToken.Length &gt; 0)
          {
              url = "https://graph.facebook.com/me/feed?access_token=" + accessToken;
          }
  
          var client = new FacebookClient();
  
          dynamic parameters = new ExpandoObject();
          if (!(String.IsNullOrEmpty(txtMessage.Text) &amp; String.IsNullOrWhiteSpace(txtMessage.Text)))
          {
              parameters.message = txtMessage.Text;
          }
          parameters.link = "";
          parameters.picture = "";
          parameters.name = "";
          parameters.caption = "";
          parameters.description = "";
          parameters.actions = new
          {
              name = "",
              link = "",
          };
          parameters.privacy = new
          {
              value = "ALL_FRIENDS",
          };
          parameters.targeting = new
          {
              countries = "",
              regions = "",
              locales = "",
          };
          try
          {
              dynamic result = client.Post("me/feed", parameters);
          }
          catch (Exception ex)
          {
              lblError.Text = ex.Message;
          }
  </code></pre>
  
  <p>I get the following exception "(OAuthException) An active access token must be used to query information about the current user." Something got changed after July 25,2011?</p>
  
  <p>I googled a lot to find a solution for this, but nothing resolved my issue.</p>
  
  <p>Thanks in advance!
  MANOOH</p>