Closed Cteha closed 8 years ago
I think that problem is in class: src/Pinterest/Utils/CurlBuilder.php, method: execFollow line: 205 $response = curl_exec($rch); First request in loop returns:
HTTP/1.1 100 Continue
HTTP/1.1 301 Moved Permanently Accept-Ranges: bytes Cache-Control: private Content-Type: text/html; charset=utf-8 Location: https://api.pinterest.com/v1/boards/ Server: nginx X-Pinterest-RID: 682442903996 X-Varnish: 4209913906 Content-Length: 279 Date: Mon, 01 Feb 2016 17:47:16 GMT Connection: keep-alive
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
Redirecting... Redirecting...
You should be redirected automatically to target URL: https://api.pinterest.com/v1/boards/. If not click the link.
The second one returns:
HTTP/1.1 100 Continue
HTTP/1.1 401 Unauthorized Accept-Ranges: bytes Cache-Control: private Content-Type: application/json Pinterest-Generated-By: devplatform-devapi-prod-be24d169 Pinterest-Version: f2fe346 Server: nginx X-Content-Type-Options: nosniff X-Pinterest-RID: 140850051584 X-Varnish: 2750063476 Content-Length: 177 Date: Mon, 01 Feb 2016 17:48:11 GMT Connection: close
{"status": "failure", "code": 3, "host": "devplatform-devapi-prod-be24d169", "generated_at": "Mon, 01 Feb 2016 17:48:11 +0000", "message": "Authorization failed.", "data": null}
The same issue with create pin.
Sounds like the auth header isn't parsed to the second request, I'll check it out.
The same issue with delete board, get remaining calls etc.
Looking into it right now. The execFollow function has been a copy-paste duo the lack of time, I'm polishing it at the moment.
Fixed in 0.2.8
Unfortunately issue is still actual for me
Nothing changed in the response or something else?
I've just tested it again and everything seems to work fine for me. You can find the code I'm using to test with in the ./demo directory.
Problem was on the local machine. On dev server everything fine. Thanks for fix.
:+1:
Still has this problem in last verison
I am facing the same problem. Please help!
The following:
returns an object like this and no board get created:
{"id":null,"name":null,"url":null,"description":null,"creator":null,"created_at":null,"counts":null,"image":null}