Closed composercodes closed 8 years ago
This is more a problem of your PHP configuration. Please check this thread (or drop the error google and look through the results) to fix it for now.
In case anyone else is having the same questions I might check to create a workaround in the code.
@dirkgroenen Please can i give you my ftp details and you check where is the wrong , might be wrong with code , Please can you help me Thanks,
You can paste the relevant parts of the code here or on something like codebin. Please make sure you've checked the sites from my previous response.
@dirkgroenen Please last question I need to get count of followers , It come as a collection how to get count .
{ "data": [ { "url": "https:\/\/www.pinterest.com\/ben\/", "first_name": "Ben", "last_name": "Silbermann", "id": "123456" }, { "url": "https:\/\/www.pinterest.com\/evan\/", "first_name": "Evan", "last_name": "Sharp", "id": "234567" } ], "page": { "cursor": "PyEyNXxmMGVmZDA5mOTAw", "next": "https:\/\/api.pinterest.com\/v1\/me\/followers\/?access_token=<YOUR-ACCESS-TOKEN>&cursor=PyEyNXxmMGVmZDA5YmOTAw" } }
Please how to get all count from this collection
Thanks,
Please surround your code with back-thicks makes it a bit more readable..
As for the followers count: you can't get that from the followers endpoint. The counts are located in the User object which can be retrieved through:
$pinterest->users->me(array(
'fields' => 'username,first_name,last_name,counts'
));
Note the extra field count
in the above example. You have to add this otherwise it will return null
.
You can also you the find
endpoint to retrieve this information for another user:
$pinterest->users->find('dirkgroenen', array(
'fields' => 'username,first_name,last_name,counts'
));
@dirkgroenen Thanks very much for help .
Thanks,
Hi, I am getting error while trying to create board using "dirkgroenen/Pinterest-API-PHP".
the error is. PinterestException in Request.php line 227: Pinterest error (code: 401) with message: Authorization failed.
My code to create board is. $pinterest->boards->create(array( "name" => "Test board from API", "description" => "Test Board From API Test" ));
whereas I can get user information etc but problem is with post request.
Can you please help me in this regards. Thanks in advance
Warning: curl_setopt_array(): CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set in /var/www/vhosts/showmb.com/dev1/maged/DirkGroenen/Pinterest/Utils/CurlBuilder.php on line 70