PHP code example of ailuoy / neteaseim

1. Go to this page and download the library: Download ailuoy/neteaseim library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ailuoy / neteaseim example snippets


$appId = 'your neteaseim appid';
$secret = 'your neteaseim secret';
$neteaseIm = new \Ailuoy\NeteaseIm\Client($appId, $secret);
try {
    $response = $neteaseIm->user->getUinfos->go(['1']);
} catch (\Ailuoy\NeteaseIm\Exceptions\NeteaseImException $e) {
    var_dump($e->getMessage());
}
var_dump($response);