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

Not working after update. #448

Closed murattikil closed 5 years ago

murattikil commented 5 years ago

I update but not working. I get this error message on log. I am sure in username and pass.

[19-Feb-2019 21:29:34 Europe/Minsk] PHP Fatal error: Uncaught seregazhuk\PinterestBot\Exceptions\AuthRequired: Error calling seregazhuk\PinterestBot\Api\Providers\Pins::create method. You must log in before. in /vendor/seregazhuk/pinterest-bot/src/Api/Providers/Core/ProviderWrapper.php:66 Stack trace:

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

1 /deneme.php(28): seregazhuk\PinterestBot\Api\Providers\Core\ProviderWrapper->__call('create', Array)

2 {main}

thrown in /vendor/seregazhuk/pinterest-bot/src/Api/Providers/Core/ProviderWrapper.php on line 66

MaurieF commented 5 years ago

hi @murattikil , I cannot reproduce the error with the login method. (1) Ensure you have the latest release v5.9.1 installed. (2) Make sure you are using php 7.

As I mentioned, with the latest release, login and create a pin is working for me.

murattikil commented 5 years ago

Php 7.2 and I use the latest version of Pinterest bot

MaurieF commented 5 years ago

Not sure what is happening for you.. I have added a small pdf for you to see working code.. its HERE

murattikil commented 5 years ago

What did you mean about running version? I use the latest release [v5.9.1] version

whoyou1 commented 5 years ago

Murat hocam çalıştıramıyorum ben kurulum hakkında hiç bilgim yok yardımcı olurmusun :)

murattikil commented 5 years ago

Şu an çalışmıyor zaten, murattikil@hotmail.com boş bir mail at, çalıştırınca haber veririm sana

MaurieF commented 5 years ago

By version, I mean the latest version of the bot, which you are using. To help you sort things out, could you please provide the actual php file which you are using to log in?...(hide your password and username)

murattikil commented 5 years ago

https://www.dropbox.com/s/wa380uzsc9qzrwz/Ads%C4%B1z.jpg?dl=0

Here is my code. it is my test code I use the pinner for a long time but stop working since 10-15 days I update with composer but not working, delete all files and create again the number is to see where the code break. It is my habit :)

MaurieF commented 5 years ago

That code looks fine....I can run an identical file with no problems with login or create a pin... So, perhaps its something to do with your directory structure on your server? I don't use composer to install, I just upload and extract the zip to the vendor\seregazhuk\pinterest-bot directory.

It does look like your directory structure is slightly different to mine.? dirstructure

UPDATE I get the same error you posted originally, if I use incorrect login details!

murattikil commented 5 years ago

Thank you very much for everyone. I fix it.

Wanna write how I fix it,

First I install with composer on localhost and then upload to my server. I use wamp and the php version of wamp was stay on php5, I overlook it :-) I didn't realize that the php version of localhost could affect the composer. After I update the localhost php version to 7, I install it again and the code block work well on server.

Thank you very much Maurie for your interesting :)

MaurieF commented 5 years ago

Glad you got things working @murattikil ... My first reaction was that it was a version conflict, but I did't test different php versions...just wrong login... You might want to add
echo PHP_VERSION;
to your testing file

murattikil commented 5 years ago

Sorry for my bad English, I hope I can explain right.

The files are in my server and it run with php 7

The problem is, first I instal on my localhost, I do not run in localhost, only install with composer and my localhost run in php 5. That is to say, composer work not well on php5.

Anyway, I solve it and hope this information help someone.. Thanks again.

buildingnicko commented 5 years ago

How to fix errors like this? @MaurieF

Sorry! We've had to block actions (logins) from your area because of suspicious activity. Please try again later.

murattikil commented 5 years ago

@buildingnicko I think you share a lot and blocked from Pinterest.

buildingnicko commented 5 years ago

@murattikil on this account there are 14 pins and pins from the browser has be done. Iam use centos 7

murattikil commented 5 years ago

Sorry, No more ideas. Look on log file, maybe there are something.