I am trying to get some viral marketing with my page by alowing people to share a product with the product's image. This is a normal usecase (cliche even) however the image source is Adobe's Scene7. I have used the debugger tool facebook provides but the best they can tell me is that "The image referenced by the url of og:image tag could not be downloaded." I understand that Scene7 urls are very complex and there is a reasonable chance that this is what facebook is choking on but is there anyway around this limitation?
I cant provide an actual url (trade secrets, NDA, etc...) but the urls we are dealing with resemble http://s7d4.scene7.com/ir/render/company/product?fmt=png&resmode=sharp2&wid=350&obj=scr&show&obj=cc&decal&src=is{company/style?$text1=H&$name1=namelong&$color1=Blue}&res=150&show
If the URL isn't publicly available (ie: I open a freshly installed browser and am able to see your link) - our scraper won't be able to see that image either. I don't think there's any work around, given the details you shared, but if a thumbnail is ok from a legal point of view (a thumbnail would end up on Facebook either way), you could use public URLs for thumbnails of the images of your products.
It turns out the problem is that there is some automatic encoding occurring with the url that is not working with scene 7.
Related
I've seen this is a common issue here on stack but it seems that the answer is always dependent on the specific scenario. I'm looking for a fellow coder to give me that "AHA" moment.
Problem: Ads posted to my website do not show the og:image content when shared to facebook until the ad is shared at least 4 times
I have thought about/ tried the following things
Checking the image size to make sure it's not large (128kb) is the norm. I compress all uploads.
Giving the ad some time to marinate before sharing (perhaps the fb crawler takes a while to cache the page)
I tried using the debug crawler tool on fb to see if I could reproduce the problem and I indeed could.
I tried sharing the ad to my own page regardless of the missing image to see if the image showed up on my wall. It did not.
The image will not show up on ANY shares until someone has clicked on the share icon on an ad at least 4 times. It seems to me like it might be some latency issue on facebook's part.
What could cause og:image to only show on subsequent share clicks?
Edit
Here's a test ad.
https://www.jdmxchange.com/Classifieds/Details/6ae72690-14d8-4bab-b039-3a2d79923794
Reading https://developers.facebook.com/docs/sharing/best-practices I found this, which might be just what you're looking for:
Use og:image:width and og:image:height Open Graph tags
Using these tags will specify the image to the crawler so that it can render it immediately without having to asynchronously.
This means, if you set the width and height of your og:image with tags, the image will show straight away.
UPDATE
Actually debugging your URL shows like this URL is redirecting to another page, and then another. Which makes me suspect the Facebook crawler is not able to access the actual OG meta tags you're using.
As a random test, I would add OG metatags to that last URL and see if Facebook uses them. But the actual solution would be to use URLs which are actually reachable to FB (no credentials necessary).
How does Facebook choose a preview image when the og:image tag is invalid? A friend and I were curious why a Facebook preview image didn't show up in the article — when we ran the URL through the Facebook debugger, it provided the following information.
Provided og:image could not be downloaded or is not big enough. Please use an image that's at least 200x200px and is accessible from Facebook. Image 'http://lostoregon.files.wordpress.com/2014/06/foodcarts.jpeg' will be used instead
Tangent: Running the debugger once appears to clear Facebook's cache, and on the next run Facebook grabbed the correct (since fixed?) image.
The one part of this I don't understand is: How did Facebook chose the http://lostoregon.files.wordpress.com/2014/06/foodcarts.jpeg image to use instead? When I look at the original page, foodcarts.jpeg isn't shown anywhere, which means either
Facebook has some secret sause for chosing from images it's seen before
Facebook picked an image that was on the page at the time, but is no longer there
Something else I'm not considering
Is this default image picking defined, deterministic behavior? If so, how does it work?
the error you describe is common enough, and the image may be all right, but Facebook probably has issues downloading it (it's too big). What happens when the image isn't good is that the get a cached representation of you page, and use the image you provided back then. If Facebook crawls many urls, and there's no image on your site, or there's no cached image, the system will pick the one you use more frequently (on all pages). At least, that's what I have seen.
i have written a plugin for the elgg social networking platform which supports sharing links to other social networks.
mostly this is ok.
i am noticing though that facebook often shows incorrect images for the video thumbnails and other sites, such as google+ are ok.
the url i am passing in to the sharer page is correct and when i use the facebook debugging tool, i see the correct image - e.g. https://developers.facebook.com/tools/debug/og/object?q=https%3A%2F%2Fwww.infiniteeureka.com%2Fvideos%2Fwatch%2F6980%2Fwater-as-primary-healing-agent-dis-ease-is-commonly-due-to-dehydration
as an example - this is the url that the plugin currently outputs for facebook, when sharing a video on my site:
https://www.facebook.com/sharer/sharer.php?s=100&p[title]=water+as+primary+healing+agent+-+dis-ease+is+commonly+due+to+dehydration&p[summary]=description&p[url]=https://www.infiniteeureka.com/videos/watch/6980/water-as-primary-healing-agent-dis-ease-is-commonly-due-to-dehydration&p[images][0]=https%3A%2F%2Fwww.infiniteeureka.com%2Fmod%2Fvideolist%2Fthumbnail.php%3Fjoindate%3D1293022025%26guid%3D6980%26owner_guid%3D2%26size%3Dlarge
when i share this to facebook, i see a thumbnail for another video which i shared days earlier, which has a different url. (edit: i now notice that i can choose from 3 images in facebook and one of them is the correct one - so facebook is building an array of 2 incorrect images in some way and is defaulting to an incorrect one.)
anyone know?
I run into this problem often as well. Try to make your image around 1080px # 1080px and see if that helps. The other options is to try and lazy load all the other images so facebook doesn't pick them up as I presume the thumbnail you are referring to is on the page?
I'm stuck with this problem for several weeks now and will try to give a short and detailed explanation below:
Situation
Users visiting the websites and has the option to generate an image with the GD-library. So every users generated a personal image. Simple... until now. After generating the image, the user gets the option to share this image to Facebook. This is done via the OpenGraph protocol.
What's working (Yeah!)
Generating the image is working perfectly fine. Sharing something to Facebook is working also.
Problem
Although the following code is used on sharing the image (fbrefresh=CAN_BE_ANYTHING). FB stills pulls an old image. Sometimes this is a really old image, sometimes it's a more current generated image. But never the just generated image.
And now?
As said I've already tried the fbrefresh=CAN_BE_ANYTHING. Also in de debug tool the right image isn't showing up, but this is probably because the generated image has an unique ID generated from the users cookie. So this id is only usable when the users clicks on generate and after that shares the generated image.
Is there any example on the internet that uses the same sort of strategy and is working? I've searched half the internet and didn't found it yet it's becoming more and more frustrating.
After generating the image, the user gets the option to share this image to Facebook. This is done via the OpenGraph protocol.
What exactly do you mean by the latter? Are you just uploading that image to the user’s wall/one of their albums, or are you publishing an Open Graph object with a user-generated photo attached? (Btw., user-generated photo is meant literally for OG actions – you should only do it with photos that the user has taken using f.e. their mobile phone camera while they where undertaking the action. I doubt if a GDlib-generated image fits into that description.)
Although the following code is used on sharing the image (fbrefresh=CAN_BE_ANYTHING). FB stills pulls an old image.
And by “pull” you mean what exactly, again? Do you upload the photo as an HTTP POST upload, do you upload it by URL, did you specify it as og:image for an OG object, or do you pass it as user-generated photo while publishing an action?
Now, usually the easiest way for resources referenced by a URL to get properly refreshed by the requesting client, is to attach a different value to the query string/as a GET parameter – f.e. the current unix timestamp: …/image.php?1984372634 or …/image.php?foo=bar&forcerefresh=1984372634
Since this value changes every second, it makes each of those URLs a different URL, and the requesting client absolutely has no choice but to request that resource, because he can not have it in its cache already.
Despite the meta tags (the first one I never used before, but it came up in the addthis forums);
And the debug tool getting the data in a correct manner:
https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.mondiales.nl%2F
The facebook sharer code does not use the image specified. No images show up at all, there is no thumbnail chooser.
Looking at the HTML of the facebook sharer page, the image is actually there! The thumbnail chooser has a display:none. And when posting the damn thing, no image shows up on the wall.
Stop using addthis and implement a like function using the just the Facebook API? But from what I read, Facebook does a request for the page to get it's data so the JS part should not be the issue, should it?
Did I overlook something?
There's a restriction on the width/height ratio of images shared, the ratio must be less than 3.0
Your image is too wide (211/66 = 3.19) - add some vertical whitespace and it'll share OK i think
For future reference this is mentioned on both the old Share Button docs and the Open Graph protocol docs (under 'og:image')
I've found that once I've posted something to my wall from the sharer or the app, if I try to repost it, it will remember the original image (or no image in your case).
It might be worth clearing the whole cache/cookies from your browser and see if that does the trick.
If not, you'll find that if you log in as another user of Facebook and they try to post it, it will pick up on the new image on their account and not yours.
I'm not exactly sure how Facebook caches the images.
I know this thread is old but this may help someone else with the same issue. FB caches shared urls along with the thumb images and descriptions. To update the cache, add a bogus parameter to your shared query string, like, "?v=1". This gets the latest og tags.