Golang Facebook Graph API App Engine
<p>I'm using huandu/facebook for Golang to access the FB API. <a href="https://github.com/huandu/facebook" rel="nofollow">https://github.com/huandu/facebook</a></p>

<p>This works really well locally but when I try to run from the Google App Engine environment, I can't get it to run.</p>

<p>I used this code locally:</p>

<pre><code>res, err := fb.Get("/me", fb.Params{
        "fields": "id,first_name,last_name,name",
        "access_token": usertoken,
    })
</code></pre>

<p>In the documentation (link above) they do mention the App Engine environment but I can'f figure out how to ge this to work with the fb.Get convention.</p>

<p>Thanks.</p>

<p><strong>Edit</strong></p>

<p>Almost got it to work!:</p>

<pre><code>// create a global App var to hold app id and secret.
var globalApp = fb.New("&lt;appId&gt;", "&lt;appSecret&gt;")

session := globalApp.Session(usertoken)  //User token here
context := appengine.NewContext(r)  //Not sure what r should be...
session.HttpClient = urlfetch.Client(context)

res, err := session.Get("/me", nil)

if err := json.NewEncoder(w).Encode(res); err != nil {
    panic(err)
}
</code></pre>

<p>If I do this I get back the Id and name. Now all I need to do is request the other parameters. Do I do this in the r parameter to the app engine context?</p>