'Facebook Graph API error - Unknown path components

My function to list add_group_account id of a particular user ends up by receiving the following error.

Message: Unknown path components: /adaccountgroups

I'm following this guideline Facebook API documentation

public function tp()
{ 
    
    $fb = new Facebook([ 
      'app_id' => "621201298943758",
      'app_secret' => "f0aa4ae743ef.................",
      'default_graph_version' => 'v2.5', 
      'default_access_token' => "EAAI0ZBrLB7w4BAIUyoGjSB50ZBsXbPxYfCjk6WxPQIa.................................",
     ]);
     
    
    try {
          // Returns a `Facebook\FacebookResponse` object
          $response = $fb->get(
            '/me/adaccountgroups',
            'EAAI0ZBrLB7w4BAIUyoGjSB50ZBs.....................'
          );
        } catch(Facebook\Exceptions\FacebookResponseException $e) {
          echo 'Graph returned an error: ' . $e->getMessage();
          exit;
        } catch(Facebook\Exceptions\FacebookSDKException $e) {
          echo 'Facebook SDK returned an error: ' . $e->getMessage();
          exit;
        }
        $graphNode = $response->getGraphNode();
     
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source