I have a page with an Open Graph image tag:
<meta property="og:image" content="http://childhumor2.homeip.net:9009/_ah/img/RYCF7Ty7wODp9R-N_QIWYA===s200"/>
The image is a GAE blob and the URL comes from calling get_serving_url. The URL works fine normally.
Now, if someone likes this page, the thumbnail image that is shown in the newsfeed is broken. Only a blank 1x1 image is returned to the browser.
Inspecting the FB page, the generated HTML is:
<img src="http://external.ak.fbcdn.net/safe_image.php?d=6b635a7f80252e93c6b28e2dbe4ad440&w=90&h=90&url=http%3A%2F%2Fchildhumor2.homeip.net%3A9009%2F_ah%2Fimg%2FRYCF7Ty7wODp9R-N_QIWYA%3D%3D%3Ds200" class="img">
When viewing the liking user's news feed for the first time, I see FB hit my server for the image:
INFO 2010-11-14 21:33:17,701 dev_appserver.py:3283] "GET /_ah/img/RYCF7Ty7wODp9R-N_QIWYA%3D%3D%3Ds200 HTTP/1.1" 500 -
It is obvious that there is a URL encoding problem with the equal signs in the URL but I have no idea who is at fault here.
To make things more confusing, the Facebook URL Linter retrieves the image properly. Also if doing a FB share on the page, the thumbnail preview will be shown correctly. This leads me to believe this is a bug with the safe_image.php script FB is proxying/caching the image with.
It is probably the case that Facebook should be unquoting the value so that it matches the original og:image you listed, and you should write a bug for that (as Nathan suggested).
However, technically speaking %3D and = have the same meaning in the path section of a URL and should be treated equally so that might also be bug worthy on the GAE side of things. In this case you probably want to urllib.unquote() the path when handled on GAE. (perhaps you could simply redirect to the unescaped version)
If the URL linter says everything is working correctly, then you are most likely correct that it is a bug with Facebook. I would recommend searching through their existing bugs to see if you can find one that exists, and if not post a new bug. There are currently about 4,300 platform bugs open so it is certainly not unheard of that something is broken. Facebook Bugs: http://bugs.developers.facebook.net/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With