Trying to implement the "pin it" button but it returns the following problem for every single image. We use SSL across the whole site and I'm wondering if this is related.
Any idea?
{"route_pattern": "^/resource/:name/:method/$", "error": {"api_error_code": 1, "message": "Sorry we could not fetch the image.", "code": "API_ERROR", "target": "<webapp.resources.pin_resource.PinResource object at 0xb851c50>", "http_status": 400}, "resource": {"name": "PinResource", "options": {"board_id": "393150311159619967", "description": "Kokeshi - Samoura\u00ef Bento", "link": "https://bentooo.com/products/kokeshi-samourai-bento", "image_url": "https://bentooo.com/upload/pictures/884/thumb/IMG_0704.jpg", "bookmarks": ["-end-"], "is_video": null, "method": "button"}}, "client_context": {"app_version": "5bdef68"}, "resource_response": {"data": null, "error": {"api_error_code": 1, "message": "Sorry we could not fetch the image.", "code": "API_ERROR", "target": "<webapp.resources.pin_resource.PinResource object at 0xb851c50>", "http_status": 400}}}
We were having exactly the same issue, everytime. Also suspected issues with our .htaccess file Rewriting non-SSL to SSL traffic.
This worked for us; not sure if it helps anybody else? We simply updated .htaccess to include an exclusion on the Rewrite where HTTP referer matches *.pinterest.com and then make sure that the &media=value was referencing a media resource using non-SSL schema.
Example:
And the pin code. Note the non-SSL &media=value.