title: facebook python-sdk post_to_wall attachment
body: <p>Hi
  I am using the python-sdk (http://github.com/facebook/python-sdk.git) on google appengine.
  I am runnig the "newsfeed" example.<br>
  In facebook.py i had to import urllib2<br>
  and then change </p>
  
  <pre><code>file = urllib.urlopen("https://graph.facebook.com/" + path + "?" +
                            urllib.urlencode(args), post_data)  
  </code></pre>
  
  <p>to   </p>
  
  <pre><code>file = urllib2.urlopen("https://graph.facebook.com/" + path + "?" +
                            urllib.urlencode(args), post_data)  
  </code></pre>
  
  <p>Now the basic application works. However if I change<br>
  in <strong>facebookclient.py</strong>  </p>
  
  <pre><code>    try:  
          self.graph.put_wall_post(message)  
      except Exception, e:  
          self.response.out.write(e)  
          return  
  </code></pre>
  
  <p>to  </p>
  
  <pre><code>    try:  
          attachment = {}  
          message = message         
          caption = 'test caption'  
          attachment['caption'] = caption  
          attachment['name'] = 'test name'  
          attachment['description'] = 'test description'  
          self.graph.put_wall_post(message, attachment=attachment)  
      except Exception, e:  
          self.response.out.write(e)  
          return  
  </code></pre>
  
  <p>i will get the error (on <a href="http://localhost:8080" rel="nofollow">http://localhost:8080</a>) :<br>
       HTTP Error 400: Bad Request<br>
  and the appengine development server complains:<br>
           INFO     2010-10-24 17:20:44,483 dev_appserver.py:3275] "POST /post HTTP/1.1" 302 -
  WARNING  2010-10-24 17:20:44,570 urlfetch_stub.py:284] Stripped prohibited headers from URLFetch request: ['Host']<br>
      INFO     2010-10-24 17:20:48,167 dev_appserver.py:3275] "GET / HTTP/1.1" 200 -<br>
      INFO     2010-10-24 17:20:48,292 dev_appserver.py:3275] "GET /static/base.css HTTP/1.1" 200 -<br>
  WARNING  2010-10-24 17:21:19,343 urlfetch_stub.py:284] Stripped prohibited headers from URLFetch request: ['Content-Length', 'Host']<br>
      INFO     2010-10-24 17:21:20,634 dev_appserver.py:3275] "POST /post HTTP/1.1" 200 -   </p>