Facebook login integration in my PHP code gives error <p>When I click on the Facebook login button I got this error.</p> <blockquote> <p>Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.</p> </blockquote> <pre><code>This is my website url:-http://192.168.1.234/photogallery/login.php </code></pre> <p>in my app settings i have written this Website with Facebook Login</p> <pre><code>Site URL: http://192.168.1.234/photogallery/login.php </code></pre> <p>Then what's the problem in site url?</p> <p>Thanks in advance... :)</p> <pre><code>public function getLoginUrl($params=array()) { $this-&gt;establishCSRFTokenState(); $currentUrl = $this-&gt;getCurrentUrl(); // if 'scope' is passed as an array, convert to comma separated list $scopeParams = isset($params['scope']) ? $params['scope'] : null; if ($scopeParams &amp;&amp; is_array($scopeParams)) { $params['scope'] = implode(',', $scopeParams); } return $this-&gt;getUrl( 'www', 'dialog/oauth', array_merge(array( 'client_id' =&gt; $this-&gt;getAppId(), 'redirect_uri' =&gt; $currentUrl, // possibly overwritten 'state' =&gt; $this-&gt;state), $params)); } protected function getCurrentUrl() { if (isset($_SERVER['HTTPS']) &amp;&amp; ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1) || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) &amp;&amp; $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') { $protocol = 'https://'; } else { $protocol = 'http://'; } $currentUrl = $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $parts = parse_url($currentUrl); $query = ''; if (!empty($parts['query'])) { // drop known fb params $params = explode('&amp;', $parts['query']); $retained_params = array(); foreach ($params as $param) { if ($this-&gt;shouldRetainParam($param)) { $retained_params[] = $param; } } if (!empty($retained_params)) { $query = '?'.implode($retained_params, '&amp;'); } } // use port if non default $port = isset($parts['port']) &amp;&amp; (($protocol === 'http://' &amp;&amp; $parts['port'] !== 80) || ($protocol === 'https://' &amp;&amp; $parts['port'] !== 443)) ? ':' . $parts['port'] : ''; // rebuild return $protocol . $parts['host'] . $port . $parts['path'] . $query; } </code></pre>