Closed helloarpitgshah closed 8 years ago
I just checked it out using the following code and everything is working fine:
$pinterest->boards->create(array(
"name" => "Test board from API",
"description" => "Test Board From API Test"
));
Are you sure that error message is a follow up on your creation code and not a pins->create
request or something like that?
Yes, I have Create Board and Create Pins both code in line,
$pintresponse = $pinterest->pins->create(array( "board" => "username/test-board", 'image_url' => $imageurl, 'note' => $message, 'link' => $link ));
I am not sure if we also get error from the create the pins.
Can you please help me?
I think the error is quite self-explaining: the board you're trying the put the pin on doesn't exist. Make sure the board you're referring to exists.
I have create the board first and add the pins on the same with adding "-" with the name.
Can you please let me know how can we get the board name from board create code?
Do you have both the code run perfectly?
You can't get the board name from the first response, though I might be able to add this to the model. For now you have to create the board name yourself, which ain't so hard since the board name is nothing more than your username and lowercase boardname with spaces replaced for -
.
It tested the code this afternoon and I can create a board and place pins on it without errors.
Hey,
I got the success with the creating the Board.
There are another issues that if we have already created the board then also we got the same issues.
I am going to search with the board first with the following code,
$Boardresponse = $pinterest->users->searchMeBoards("test");
$response1 = $pinterest->assertInstanceOf( "DirkGroenen\Pinterest\Models\Collection", $Boardresponse );
$board = $pinterest->assertInstanceOf( "DirkGroenen\Pinterest\Models\Board", $Boardresponse->get(0) );
There are following error,
Fatal error: Call to undefined method DirkGroenen\Pinterest\Pinterest::assertInstanceOf();
Can you please help me?
Did you take the effort to read the README.md
? You're using test methods which, of course, won't work.
I would suggest you to carefully read the readme, take a look at the demo and fiddle around.
Hey,
I have added some code to create the board and I got the following error every time,
Fatal error: Uncaught exception 'DirkGroenen\Pinterest\Exceptions\PinterestException' with message 'Pinterest error (code: 404) with message: Board not found.'
Can you please help me?