seregazhuk / php-pinterest-bot

This PHP library will help you to work with your Pinterest account without using any API account credentials.
MIT License
413 stars 129 forks source link

Get board that i am following #421

Closed rjkhan closed 5 years ago

rjkhan commented 5 years ago

how i can get a board and pins that i am following or particular user is following ? can you please guide me or help me

thanks

seregazhuk commented 5 years ago

Hi @rjkhan . Try this, I think this will help you 👍

rjkhan commented 5 years ago

I will try this and give you feedback after that 👍

On Thu, 25 Oct 2018 at 5:06 PM, Sergey Zhuk notifications@github.com wrote:

Hi @rjkhan https://github.com/rjkhan . Try this https://github.com/seregazhuk/php-pinterest-bot/blob/master/docs/pinners.md#boards, I think this will help you 👍

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/seregazhuk/php-pinterest-bot/issues/421#issuecomment-433087662, or mute the thread https://github.com/notifications/unsubscribe-auth/ASnYhBRdZy5L9_vn2Q0IKPgdH5P75Zhyks5uodN8gaJpZM4XiYxm .

-- CEO Appers Tech Pakistan Contact: 03234566470 swedish contact : +46734816655 rabnawaz.jansher(skype)

rjkhan commented 5 years ago

@seregazhuk i am looking for boards that i am following. boards that are created by other but i am following those board i want to search these boards ?

hope you understand my point ? any way or solution to that ?

seregazhuk commented 5 years ago

@rjkhan This code should return boards that your are following:

foreach ($bot->pinners->followingBoards('your-user-name') as $user) {
    // Loop through boards
}

If you want to search, then there is no such feature 😞

rjkhan commented 5 years ago

when i implement your code something like this `foreach ($bot->pinners->followingBoards($username)->take(1000) as $user) {

echo $user["name"], "<br>";
// fetch pins on boards
foreach ($bot->boards->pins($user['id']) as $pin) {
    $pin_info = fetch_pin($pin);
    $csv_reader->insert_data_into_csv($pin_info,$file);

}

}`

here is my code... but it gives me limited boards... like I am following 50 plus boards it gives me a

12 boards out fo 50 plus boards i am following

can you please guide me how I fetch all boards ???

thanks @seregazhuk

seregazhuk commented 5 years ago

@rjkhan just specify a limit as a second argument (by default it equals 50):

$limit = 250; // your value
$bot->boards->pins($user['id'], $limit)
rjkhan commented 5 years ago

@seregazhuk thanks its work for me now