title: Omniauth facebook - fetch friends
body: <p>I am trying to configure omniauth-facebook to fetch user friends.</p>
  
  <p>This is my configuration:</p>
  
  <pre><code>ActionController::Dispatcher.middleware.use OmniAuth::Builder do
      provider :facebook, "xxxxxx", "xxxxxxxx",
        :info_fields =&gt; 'friends'
  end
  </code></pre>
  
  <p>I am using Rails 2.3.</p>
  
  <p>I am using this code in view:</p>
  
  <pre><code>&lt;div id="contacts"&gt;
  
  &lt;/div&gt;
  &lt;script type="text/javascript" charset="utf-8"&gt;
  
    $('contacts').innerHTML = '&lt;%= request.env['omniauth.auth'].keys %&gt;';
  &lt;/script&gt;
  </code></pre>
  
  <p>I am not sure why the script  is not being executed, but when I copy:</p>
  
  <pre><code>  $('contacts').innerHTML = 'infouidcredentialsextraprovider';
  </code></pre>
  
  <p>in console after page has loaded it works replacing content of div with that text.</p>
  
  <p>There is no error message in browser console.</p>
  
  <p>Why script does not get executed? I tried with console.log too, and I had no luck.</p>