Title: sbideau's Replies | WordPress.org

---

# sbideau

  [  ](https://wordpress.org/support/users/sbideau/)

 *   [Profile](https://wordpress.org/support/users/sbideau/)
 *   [Topics Started](https://wordpress.org/support/users/sbideau/topics/)
 *   [Replies Created](https://wordpress.org/support/users/sbideau/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/sbideau/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/sbideau/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/sbideau/engagements/)
 *   [Favorites](https://wordpress.org/support/users/sbideau/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Password Protect Wordpress] Autologin with referer IP address](https://wordpress.org/support/topic/autologin-with-referer-ip-address/)
 *  [sbideau](https://wordpress.org/support/users/sbideau/)
 * (@sbideau)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/autologin-with-referer-ip-address/#post-6108652)
 * FYI, you’re missing a “{” at the end of line 14.
 * Perhaps you can help me with my need, which is to allow Facebook’s crawler to
   see my content without a password. I tried the following, right where your code
   starts (instead of yours), with no luck:
 *     ```
       $userAgent = "";
       		$userAgent = @$_SERVER['HTTP_USER_AGENT'];
       		if (strpos($userAgent, 'facebookexternalhit') !== FALSE) {
       			//refresh logged in cookies
       			this->setCookie();
       		    return;
       		}
       		else {
       			$isLoggedIn = apply_filters( $this->_slug( "isLoggedIn" ), false );
       		}
       		if (false === $isLoggedIn ) {
       			do_action( $this->_slug( "displayLoginPage" ) );
       			exit;
       		}
       ```
   
 * I even tried just a:
 * ‘
    this->setCookie(); return; ‘
 * to try and make everything go around login…and it’s not working. So what obvious
   point am I missing?

Viewing 1 replies (of 1 total)