title: GAE - Facebook graph porting
body: <p>Does anyone know any places where I may be able to find a <code>python</code> (AppEngine) port for the <code>Facebook Graph</code> <code>object</code> code?</p>
  
  <p>The example <a href="http://developers.facebook.com/docs/tutorials/ios-sdk-tutorial/publish-open-graph-story/" rel="nofollow">here</a> shows the sample code:</p>
  
  <pre><code>&lt;?php
  function curPageURL() {
   $pageURL = 'http://';
   if ($_SERVER["SERVER_PORT"] != "80") {
    $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
   } else {
    $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
   }
   return $pageURL;
  }
  ?&gt;
  
  &lt;html&gt;
    &lt;head prefix="og: http://ogp.me/ns# product: http://ogp.me/ns/product#"&gt;
      &lt;meta property="fb:app_id" content="&lt;?php echo strip_tags($_REQUEST['fb:app_id']);?&gt;"&gt;
        &lt;meta property="og:url" content="&lt;?php echo strip_tags(curPageURL());?&gt;"&gt;
        &lt;meta property="og:type" content="&lt;?php echo strip_tags($_REQUEST['og:type']);?&gt;"&gt;
        &lt;meta property="og:title" content="&lt;?php echo strip_tags($_REQUEST['og:title']);?&gt;"&gt;
        &lt;meta property="og:image" content="&lt;?php echo strip_tags($_REQUEST['og:image']);?&gt;"&gt;
        &lt;meta property="og:description" content="&lt;?php echo strip_tags($_REQUEST['og:description']);?&gt;"&gt;
        &lt;title&gt;Product Name&lt;/title&gt;
    &lt;/head&gt;
      &lt;body&gt;
        &lt;?php echo strip_tags($_REQUEST['body']);?&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>but of course since this is PHP, I need to find an equivalent for Python to use in Google's App Engine.</p>
  
  <p><strong>Has anyone seen anything like this in Python?</strong></p>