seregazhuk / php-pinterest-bot

This PHP library will help you to work with your Pinterest account without using any API account credentials.
MIT License
416 stars 129 forks source link

Observing the PhP Fatal Error again with the v5.9.1 #519

Closed gonjumixproject closed 4 years ago

gonjumixproject commented 4 years ago

Hi all,

I started to observe following error with the v5.9.1, same issue solved with 5.9.1.

Anyone else ?

PHP Fatal error: Uncaught seregazhuk\PinterestBot\Exceptions\AuthRequired: Error calling seregazhuk\PinterestBot\Api\Providers\User::isBanned method. You must log in before. in /home/composer/vendor/seregazhuk/pinterest-bot/src/Api/Providers/Core/ProviderWrapper.php:66 Stack trace:

0 /home/composer/vendor/seregazhuk/pinterest-bot/src/Api/Providers/Core/ProviderWrapper.php(42): seregazhuk\PinterestBot\Api\Providers\Core\ProviderWrapper->checkMethodForLoginRequired('isBanned')

1 /home/composer/vendor/auto_pins_values.php(22): seregazhuk\PinterestBot\Api\Providers\Core\ProviderWrapper->__call('isBanned', Array)

2 {main}

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

fdciabdul commented 4 years ago

check your account again

oleg2k18 commented 4 years ago

Im have this error too, but only on fresh registererd accounts. On old accounts all work fine.

gonjumixproject commented 4 years ago

check your account again

Not really sure what you mean by check your account, this waas perfectly working earlier. My account is not banned as well..

gonjumixproject commented 4 years ago

It does not gives an error to "getLastError()" but it dumps "amihere", so obviously does not like my userlogin or pass, but I can login correctly with them to the site.. Php.error files are also empty

$result = $bot->auth->login('gonjumixproject@gmail.com', 'xxx');

if(!$result) { $error = $bot->getLastError(); echo $error; echo "amihere\n"; die(); }

fdciabdul commented 4 years ago

It does not gives an error to "getLastError()" but it dumps "amihere", so obviously does not like my userlogin or pass, but I can login correctly with them to the site.. Php.error files are also empty

$result = $bot->auth->login('gonjumixproject@gmail.com', 'xxx');

if(!$result) { $error = $bot->getLastError(); echo $error; echo "amihere\n"; die(); }

i mean check your email and password again , that's like you put wrong email or password

the login function is still works

require('vendor/autoload.php'); 

use seregazhuk\PinterestBot\Factories\PinterestBot;

$bot = PinterestBot::create();
$bot->auth->login('email', 'pass');
$boards  = $bot->boards->forUser('abdulmuttaqin456');

print_r($boards);

Screenshot_2020_1005_223448

gonjumixproject commented 4 years ago

It gives the same output for me as well for "print_r($boards);" did you tried autopinning ?

fdciabdul commented 4 years ago

It gives the same output for me as well for "print_r($boards);" did you tried autopinning ?

it's works as well don't you ? Screenshot_2020_1005_233229

did you try to check account on pinterest web ?

$pin = $bot->pins->create('https://avatars0.githubusercontent.com/u/31664438?s=460&u=251f36d7ab0fb4a74b162be7b18f6cdca8a74f8c&v=4', $boards[0]['id'], 'Pin description');

print_r($pin);

see https://pin.it/70U2s2x

gonjumixproject commented 4 years ago

same issue for me, and for sure I tried it on pinterest web. Will double check at my linux server but it is not working in the Windows with following error;

thrown in C:\Program Files (x86)\PHP\v7.0\vendor\auto_pins.php on line 12 [05-Oct-2020 11:41:17 America/Los_Angeles] PHP Fatal error: Uncaught seregazhuk\PinterestBot\Exceptions\AuthRequired: Error calling seregazhuk\PinterestBot\Api\Providers\Pins::create method. You must log in before. in C:\Program Files (x86)\PHP\v7.0\vendor\seregazhuk\pinterest-bot\src\Api\Providers\Core\ProviderWrapper.php:66 Stack trace:

0 C:\Program Files (x86)\PHP\v7.0\vendor\seregazhuk\pinterest-bot\src\Api\Providers\Core\ProviderWrapper.php(42): seregazhuk\PinterestBot\Api\Providers\Core\ProviderWrapper->checkMethodForLoginRequired('create')

1 C:\Program Files (x86)\PHP\v7.0\vendor\auto_pins.php(17): seregazhuk\PinterestBot\Api\Providers\Core\ProviderWrapper->__call('create', Array)

2 {main}

thrown in C:\Program Files (x86)\PHP\v7.0\vendor\seregazhuk\pinterest-bot\src\Api\Providers\Core\ProviderWrapper.php on line 66

gonjumixproject commented 4 years ago

I get my old code, and now its working, thanks