Pinterest Could Not Fetch The Image
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
Solution 1:
We were having exactly the same issue, everytime. Also suspected issues with our .htaccess file Rewriting non-SSL to SSL traffic.
"resource_response":{"data":null,"error":{"api_error_code":1,"message":"Sorry! Something went wrong on our end. Please try again.","code":"API_ERROR","target":"<webapp.resources.pin_resource.PinResource object at 0x7f0c9b421e50>","http_status":400}}
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:
RewriteCond %{ENV:siteENV} PROD
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_REFERER} !(?:pinterest.com)
RewriteRule (.*) https://www.somedomain.com%{REQUEST_URI} [L,R=301]
And the pin code. Note the non-SSL &media=value.
<ahref="//pinterest.com/pin/create/button/?url=https://www.somedomain.com/mypage&media=http://www.somedomain.com/assets/images/myimage.jpg&description=Some%20urlencoded%20description"data-pin-do="buttonPin"data-pin-config="beside"><imgsrc="//assets.pinterest.com/images/pidgets/pin_it_button.png" /><imgsrc="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_red_28.png" /></a>
Post a Comment for "Pinterest Could Not Fetch The Image"