-
Notifications
You must be signed in to change notification settings - Fork 129
boards->forUser() Not returning secret boards. #244
Comments
Hi, @zjzeit |
I am logged into the business account. To verify: I was able to pin from a business account to a secret board using the board ID (thus proving the credentials work). That is sufficient for what I need (I can hardcode the secret boardID), I'm just not able to fetch the secret board via boards->forUser(). I'm wondering if Pinterest doesn't respond with secret boards when the query returns > 20 (or some number) of results. Thanks for this awesome code! |
I cannot reproduce it. I've registered a new business account. Created 88 public and 8 private boards. $bot = PinterestBot::create();
$bot->auth->login('bimutriche@housat.com', 'secret');
$boards = $bot->boards->forUser('bimutriche');
echo count($boards); // 96 |
Ah thanks for the demo! I was able to replicate the issue but realized the issue only existed because I modified your getUser function. The issue was certainly on my end. from After undoing that change, I was able to get all the secret boards again. If you have a way to grab all of a user's boards (including extra data like the image_cover_url and pin_count), that would be awesome. Sorry to post an issue that was really my own issue [: |
Oh, I see. I'll research it. Now you can use this
to get board detail information. |
Gotcha. That would involve iterating through each board as in: for ($bot->boards->forUser('username') as $board)
{
$bot->boards->info($board['name']); // note: replace key with whatever key gives the board name
} Calling |
@zjzeit /**
* Get boards for user by username.
*
* @param string $username
*
* @return array|bool
*/
public function forUser($username)
{
$options = [
'username' => $username,
'field_set_key'=>'detailed',
];
return $this->execGetRequest($options, UrlBuilder::RESOURCE_GET_BOARDS);
} And it still returns all the boards. Do you have any ideas with your issue behaviour? |
Yeah it's weird: because I cannot replicate the issue with a generated business account, I don't know how to diagnose it. |
Maybe it was an issue on Pinterest side. Anyway, in the next release, I will add |
I have a staging pinterest account (non-business) with 2 public boards, 2 secret boards. On staging, boards->forUser() will successfully grab all 4 boards. On my business Pinterest account, I have 88 public boards and 4 secret boards. Using boards->forUser('userHere',100) with this business account only fetches 88 of the 92 boards. Not sure if the difference in number of boards or difference in type of account (normal vs business) is causing the change in behavior.
The text was updated successfully, but these errors were encountered: