title: Facebook fetcher C# console application
body: <p>I am new at facebook sdk so asking very basic question. I need to fetch user information from Facebook in C# console application. I have created one Application in Facebook.com/developer and set its type to "Native/Desktop" and have its AppID as well as Secret Key. I have also downloaded Facebook C# SDK 5.4.1.</p>
  
  <p>Now I am not sure, how to proceed, I tried to fetch all my feeds using following code.</p>
  
  <pre><code>FacebookClient client = new FacebookClient("AppID", "Secret Key");
  var result = client.Get("me/feed");
  </code></pre>
  
  <p>But get exception "<strong>(OAuthException) An active access token must be used to query information about the current user</strong>."</p>
  
  <p>After some research I find out that I will have to get Access Token so I used following code to get access token</p>
  
  <pre><code>string url = "https://graph.facebook.com/oauth/access_token?client_id=APPID&amp;client_secret=SECRETKEY&amp;grant_type=client_credentials";
          WebRequest request = WebRequest.Create(url);
          WebResponse response = request.GetResponse();
          StreamReader reader = new StreamReader(response.GetResponseStream());
          string token = reader.ReadToEnd();
  </code></pre>
  
  <p>so I get response (in token) like this "access_token=322232329253232323|323233riZZZZZZZ_3p1BdHf3232332323k"
  So now I tried like this </p>
  
  <pre><code>FacebookClient client = new FacebookClient(token.Replace("access_token=", ""));
          var feeds = client.Get("me/feed");
  </code></pre>
  
  <p>But still get the exception "<strong>(OAuthException) An active access token must be used to query information about the current user.</strong></p>
  
  <p>Can anyone please guide me, how to proceed and fetch the information.
  Thanks in advance</p>