title: Passport.js and Facebook Graph API
body: <p>I have some issue with Passport.js and Facebook Graph API 2.0. I cannot get my own friend list (it's returning an empty array, but working fine if I requesting my own feed) if using the access token that I got from Passport, but it's working fine if I copy the access token that I got from the Facebook graph explorer.</p>
  <p>Here is some of my code.</p>
  <p>Routes and scope:</p>
  <pre><code>app.get('/auth/facebook', passport.authenticate('facebook', { scope: ['user_friends', 'user_status', 'read_stream'] }));
  </code></pre>
  <p>Request to Facebook Graph API (using Node.js standard module):</p>
  <pre><code>var fbReq = https.request({
              hostname: 'graph.facebook.com',
              method: 'GET',
              path: '/v2.0/me/friends?access_token=' + accessToken
          }, function(fbRes) {
              var output = '';
              fbRes.setEncoding('utf8');
              console.log(&quot;log the data&quot;);
              
              fbRes.on('data', function(chunk) {
                  console.log(chunk.length);
                  output += chunk;
              });
  
              fbRes.on('end', function() {
                  return res.render('home/postLogin', { data: output });
              });
  
          });
          
          fbReq.on('error', function(err) {
              console.error(err);
          });
  
          fbReq.end();
  </code></pre>