Tustin / psn-php

A PHP wrapper for the PSN API
https://tustin.dev/psn-php/
MIT License
354 stars 73 forks source link

login code runs without errors but theres no token dispalyed #214

Closed merrychrishna closed 2 years ago

merrychrishna commented 2 years ago

installed psn-php with install composer setup executable

in cmd type this composer config platform.php 7.2.5

then type this composer require tustin/psn-php

then when i run the login code with my npss code


require_once 'vendor/autoload.php';

use Tustin\PlayStation\Client;
$client = new Client();
$client->loginWithNpsso(MY CODE);
$refreshToken = $client->getRefreshToken()->getToken();
?>```

by typing "php myphp.php" in a windows cmd prompt
the file runs without errors but the token is not dispalyed.
Ragowit commented 2 years ago

Do you output the $refreshToken somewhere in your code?

merrychrishna commented 2 years ago

i dont know how to do that. could you give me an example please?

Ragowit commented 2 years ago

echo $refreshToken;

This is basic PHP knowledge, you should probably read more about PHP before venturing further.

merrychrishna commented 2 years ago

that worked. thanks so much. sorry about that