title: How to parse a facebook graph api response
body: <p>I have a facebook graph api request which brings back this response</p>
  
  <pre><code>Facebook\GraphObject Object
  (
      [backingData:protected] =&gt; Array
          (
              [data] =&gt; Array
                      (
                          [0] =&gt; stdClass Object
                              (
                                  [id] =&gt; 111
                                  [from] =&gt; stdClass Object
                                      (
                                          [id] =&gt; 111
                                          [name] =&gt; fo bar
                                      )
  
                                  [name] =&gt; etc
  
                              )
  </code></pre>
  
  <p>I've tried to do <code>$reponse-&gt;{'backingData:protected'}</code> but it doesn't work.</p>
  
  <p>Also the next set of results is a link to the graph api but the results from this is pure json.</p>
  
  <pre><code>    [paging] =&gt; stdClass Object
          (
              [cursors] =&gt; stdClass Object
                  (
                      [after] =&gt; MTI3NzMzMTQwMzYy
                      [before] =&gt; MTAxNTQzNjI5NTY1NDAzNjM=
                  )
  
              [next] =&gt; https://graph.facebook.com/v2.0/111/albums?access_token=xxxxv&amp;limit=25&amp;after=yyy
          )
  </code></pre>
  
  <p>My code</p>
  
  <pre><code>    $user_profile = (new FacebookRequest(
          $session, 'GET', '/me/albums'
      ))-&gt;execute()-&gt;getGraphObject();
  
      echo '&lt;pre&gt;'; print_r($user_profile); echo '&lt;/pre&gt;';
  </code></pre>