0

I am trying to get member list of my ning pro network with there details for my applications, but still I can't figure out what should I do for for this

I used this code for get photos from ning api

require_once('NingApi.php');

$ningApi = new NingApi('mychatterbook', 'xxxxx-e44f-47b5-ba0d-e99d98ba60be', 'xxxxx-436f-4ba0-9911-a2ac5b5a00bb','sunethx@gmail.com','xxxxxx');


// Get the most recent photo
$result = $ningApi->photo->fetchNRecent();

Please help me anyone knows how to implement this using php..

Thank you

suannai
  • 552
  • 1
  • 4
  • 17
Suneth Kalhara
  • 1,211
  • 6
  • 20
  • 40

1 Answers1

0

i got it, it need to Login with admin account for get the users information, this returns 2 users.

require_once('NingApi.php');

    $ningApi = new NingApi('xxxbook', 'd1216884-e44f-47b5-xxx-xxxxe', 'xxx-xx-4ba0-9911-xxxxxxx','xxxx@gmail.com','xxx');

    try {
      $result1 =  NingApi::instance()->user->fetchNRecent(2);

    } catch (Exception $e) {
      echo "Error: ".$e->getMessage()."\n".$e->getTraceAsString();
    }

        print_r($result1);
Suneth Kalhara
  • 1,211
  • 6
  • 20
  • 40