I get only top 50 pins at a time using this code
https://api.pinterest.com/v3/pidgets/users/lorihiney/pins/
is there any way to get all pins of a particular user .
I get only top 50 pins at a time using this code
https://api.pinterest.com/v3/pidgets/users/lorihiney/pins/
is there any way to get all pins of a particular user .
I faced this problem too when trying to use the API and it left me pulling my hair out!!
I ended up creating a recursive function using info I found online to get all the child pages of a board, while also pushing the pins to an array.
I first saved all my boards to a MYSQL table, then the pins in another. Saves on API calls and made finding duplicates much easier (that was what I was trying to use it for)!
$pins=array();
function findchildren(&$array, $i){
global $pins;
if (true == $i){return;}
foreach($array as $k=>$v){
array_push($pins, $v['data']);
if(!empty($v['page']['next'])){
$newar = curlfunction($v['page']['next']);
findchildren($newar, false);
}
}
}
So something like:
$board = curlfunction('https://api.pinterest.com/v1/boards/lorihiney/diet/pins/?access_token=xxxxx&limit=100&fields=id,link,counts,note,url,image');
findchildren($board, false);
You'd just need to create the cURL function to get the data!!
My Pinterest account has 31 boards and 1890 pins. Works a treat for me after spending AGES trying to figure it out. Hope that it helps somewhat.