Now how do I authenticate in Facebook's PHP SDK 3.0.0?
So Facebook has changed the authentication process. Again. The example in the PHP SDK is:

    $user = $facebook->getUser();
    
    if ($user) {
      try {
        $user_profile = $facebook->api('/me');
      } catch (FacebookApiException $e) {
        error_log($e);
        $user = null;
      }
    }

However, now how do we authenticate users who have not already authenticated? Do we simply create an `else` statement and a call to the result of `$facebook->getLoginUrl()`?

Also, the example above gives me an error as the call to `$facebook->getUser()` returns my user ID, but then my app falls over when trying to call `$facebook->api('/me')` giving the error:

> **Fatal error:** Uncaught OAuthException: An active access token must be used to query information about the current user. thrown in **/home/woohoobi/public_html/facebookv2/inc/facebook.php** on line **560**

Any assistance on how to authenticate a non-authenticated user would be great.
Now how do I authenticate in Facebook's PHP SDK 3.0.0?
===

So Facebook has changed the authentication process. Again. The example in the PHP SDK is:

    $user = $facebook->getUser();
    
    if ($user) {
      try {
        $user_profile = $facebook->api('/me');
      } catch (FacebookApiException $e) {
        error_log($e);
        $user = null;
      }
    }

However, now how do we authenticate users who have not already authenticated? Do we simply create an `else` statement and a call to the result of `$facebook->getLoginUrl()`?

Also, the example above gives me an error as the call to `$facebook->getUser()` returns my user ID, but then my app falls over when trying to call `$facebook->api('/me')` giving the error:

> **Fatal error:** Uncaught OAuthException: An active access token must be used to query information about the current user. thrown in **/home/woohoobi/public_html/facebookv2/inc/facebook.php** on line **560**

Any assistance on how to authenticate a non-authenticated user would be great.