Can you please help me to use the edit command ?
Opened this issue · 0 comments
gonjumixproject commented
Hi all,
I am trying to edit the pins inside of a specific board, however my script partially works..
Sometimes it edits 10 pins, sometimes it edits 1 pin. It does not edit repins at all...
Can you please help me on this ?
if($_POST){
$newLink = $_POST['link'];
$board = $boards[$_POST['board']];
$boardId = $board['id'];
$boardPinCount = $board['pin_count'];
$pins = Array();
foreach ($bot->boards->pins($boardId, $boardPinCount) as $pin) {
array_push($pins, $pin);
}
foreach ($pins as $pin) {
$desc = $pin['description'];
$link = $newLink;
$bot->pins->edit($pin['id'], $desc, $link);
echo $pin['id'];
echo '<br>';
echo $pin['description'];
echo '<br>';
}
Thank you..