title: Facebook SDK v4 for PHP Minimal Example
body: <p>I'm trying to get the minimal example</p>
  
  <pre><code>using Facebook\FacebookSession;
  
  FacebookSession::setDefaultApplication('YOUR_APP_ID','YOUR_APP_SECRET');
  
  // Use one of the helper classes to get a FacebookSession object.
  //   FacebookRedirectLoginHelper
  //   FacebookCanvasLoginHelper
  //   FacebookJavaScriptLoginHelper
  // or create a FacebookSession with a valid access token:
  $session = new FacebookSession('access-token-here');
  
  // Get the GraphUser object for the current user:
  
  try {
    $me = (new FacebookRequest(
      $session, 'GET', '/me'
    ))-&gt;execute()-&gt;getGraphObject(GraphUser::className());
    echo $me-&gt;getName();
  } catch (FacebookRequestException $e) {
    // The Graph API returned an error
  } catch (\Exception $e) {
    // Some other error occurred
  }
  </code></pre>
  
  <p>from the <a href="https://github.com/facebook/facebook-php-sdk-v4/blob/master/README.md">README</a> working, but I don't understand what the first line of code means. Where do I have to put the PHP file using that minimal code example within the SDK file structure. I tried directly in the src folder, but that returns the following PHP error</p>
  
  <pre><code>[01-May-2014 20:12:26 Europe/Berlin] PHP Parse error:  syntax error, unexpected 'Facebook' (T_STRING) in /Applications/MAMP/htdocs/facebook-php-sdk-v4/src/test.php on line 9
  </code></pre>
  
  <p>The file structure looks like this</p>
  
  <pre><code>├── src
  │   ├── Facebook
  │   │   ├── FacebookAuthorizationException.php
  │   │   ├── FacebookCanvasLoginHelper.php
  │   │   ├── FacebookClientException.php
  │   │   ├── FacebookJavaScriptLoginHelper.php
  │   │   ├── FacebookOtherException.php
  │   │   ├── FacebookPermissionException.php
  │   │   ├── FacebookRedirectLoginHelper.php
  │   │   ├── FacebookRequest.php
  │   │   ├── FacebookRequestException.php
  │   │   ├── FacebookResponse.php
  │   │   ├── FacebookSDKException.php
  │   │   ├── FacebookServerException.php
  │   │   ├── FacebookSession.php
  │   │   ├── FacebookThrottleException.php
  │   │   ├── GraphLocation.php
  │   │   ├── GraphObject.php
  │   │   ├── GraphSessionInfo.php
  │   │   ├── GraphUser.php
  │   │   └── fb_ca_chain_bundle.crt
  │   └── test.php
  </code></pre>