Closed paksociety closed 5 years ago
Also a way to delete created pin if we want to delete them
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:
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.