title: Facebook login only works when hosts is set to localhost?
body: <p>Unfortunately I keep getting this error:</p>
  
  <pre><code>{
     "error": {
        "message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.",
        "type": "OAuthException",
        "code": 191
     }
  }
  </code></pre>
  
  <p>Login works however when my <code>/etc/hosts</code> file is set to: <code>127.0.0.1 [mysite].rhcloud.com</code>, it only fails when I view the actual <code>[mysite].rhcloud.com</code>.</p>
  
  <p>I am running the exact same application (on a different server) locally as the one I'm running on rhcloud. Specifically the local&lt;->remote web-application directories are synced.</p>
  
  <h3>URL information</h3>
  
  <p>When attempting login remotely the URL looks like this; and fails with aforementioned error:</p>
  
  <p>https://graph.facebook.com/oauth/authorize?scope=user_photos%2Cfriends_photos&amp;redirect_uri=http%3A%2F%2F[mypublicipaddress]%2Fuser%2Flogin&amp;response_type=code&amp;client_id=[hidden]</p>
  
  <p>Whereas attempting to login locally the URL looks like this; and works:</p>
  
  <p>https://www.facebook.com/dialog/permissions.request?app_id=[hidden]&amp;display=page&amp;next=http%3A%2F%2F[hidden].rhcloud.com%2Fuser%2Flogin&amp;response_type=code&amp;perms=user_photos%2Cfriends_photos&amp;fbconnect=1</p>