title: How can my facebook application post message to a wall?
body: <p>i already found out how to post something to a wall with the graph api on behalf of the facebook user. But now i want to post something in the name of my application. </p>
  
  <p>Here is how i'm trying to do this:</p>
  
  <pre><code>protected void btn_submit_Click(object sender, EventArgs e)
  {
  
      Dictionary&lt;string, string&gt; data = new Dictionary&lt;string, string&gt;();
      data.Add("message", "Testing");
      // i'll add more data later here (picture, link, ...)
      data.Add("access_token", FbGraphApi.getAppToken());
      FbGraphApi.postOnWall(ConfigSettings.getFbPageId(), data);
  
  }
  </code></pre>
  
  <p>FbGraphApi.getAppToken()</p>
  
  <pre><code>// ...
  private static string graphUrl = "https://graph.facebook.com";
  //...
  
  public static string getAppToken() {
      MyWebRequest req = new MyWebRequest(graphUrl + "/" + "oauth/access_token?type=client_cred&amp;client_id=" + ConfigSettings.getAppID() + "&amp;client_secret=" + ConfigSettings.getAppSecret(), "GET");
      return req.GetResponse().Split('=')[1];
  }
  </code></pre>
  
  <p>FbGraphApi.postOnWall()</p>
  
  <pre><code>public static void postOnWall(string id, Dictionary&lt;string,string&gt; args)
      {
          call(id, "feed", args);
      }
  </code></pre>
  
  <p>FbGraphApi.call()</p>
  
  <pre><code>private static void call(string id, string method, Dictionary&lt;string,string&gt; args )
  {
      string data = "";
      foreach (KeyValuePair&lt;string, string&gt; arg in args)
      {
  
          data += arg.Key + "=" + arg.Value + "&amp;";
  
      }
  
      MyWebRequest req = new MyWebRequest(graphUrl +"/" + id + "/" + method, "POST", data.Substring(0, data.Length - 1));
  
  
      req.GetResponse();  // here i get: "The remote server returned an error: (403) Forbidden."
  }
  </code></pre>
  
  <p>Does anyone see where this i going wrong? I'm really stuck on this.</p>
  
  <p>Thanks!</p>