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

Info Required #438

Closed paksociety closed 5 years ago

paksociety commented 5 years ago

HI, I want to know how we can get the url to pin we created using this script? this is not an issue and please suggest me a way to ask questions on github.

paksociety commented 5 years ago

Also a way to delete created pin if we want to delete them

MaurieF commented 5 years ago

I would just run: $bot->pinners->pins(PinterestUsername, NumberOfPins) ->toArray(); Then use the result to grab the data you need.

e.g. To get the last 20 pins by louisemyers... $pusername = 'louisemyers'; $RecentPins = $bot->pinners->pins($pusername, 20) ->toArray();

Then a for each to return the info you want to include: foreach($RecentPins as $pinfo){ echo '<div style = "display: inline-block; margin: 5px 0px 5px 15px; padding: 0px 5px 0px 0px; border: 1px solid #cccccc; border-radius: 4px;"><a href = "' .$pinfo[images]['736x'][url]. '" target = "_blank"><img style = "margin: 5px 5px 0px 5px;" src = "'.$pinfo[images]['136x136'][url].'" </a>URL: <a href = "https://pinterest.com/pin/' .$pinfo[id].'"target = "_blank">https://pinterest.com/pin/'.$pinfo[id].'</a><br/>Pin ID: ' .$pinfo[id].'<br/> Time Created: ' .$pinfo[created_at].'</div><br/>'; } This would produce html output similar to this snapshot: marthadisp

MaurieF commented 5 years ago

Hi @Iquaridys , The login issue has been fixed in the latest release....you can find it HERE

I have no problems using the login method with that version. So, make sure you have updated to the newest version of the bot and that you are running php 7.

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