Facebook Feed Dialog doesn't always show image

108 Views Asked by At

I have a Drupal site that allows users to share content to some networking/social websites - in this case, facebook specifically. We had a feed dialog set up to handle this sharing such as:

<a class="facebook" href="https://www.facebook.com/dialog/feed?app_id=*removed*&link={{ url('<front>') }}/node/{{ row.nid }}&picture={{ url('<front>') }}{{ file_url(row.preview_image_uri) }}&name={{ row.title }}&redirect_uri=http%3A%2F%2Fwww.facebook.com%2F" alt="Share this graph on Facebook" title="Share on Facebook" target="_blank">

That was working fine until a week or two ago, when facebook's documentation says they phased out some of those parameters, namely 'picture'. I rewrote it to be:

<a class="facebook" href="https://www.facebook.com/dialog/feed?app_id=*removed*&display=page&link={{ url('<front>') }}node/{{ row.nid }}&name={{ row.title }}&redirect_uri=https://www.facebook.com&show_error=true" alt="Share this graph on Facebook" title="Share on Facebook" target="_blank">

but now there is no consistent preview image being displayed. Has anyone else run into this problem and know how to affix a consistent preview image? There is a 'source' parameter that I tried inserting as:

&source={{ url('<front>') }}{{ url(row.preview_image_uri) }}&picture={{ url('<front>') }}{{ url(row.preview_image_uri) }}

but to no success.

I've also noticed that sometimes the images DO pull, but only after I've tried sharing a bunch of times. Could this be due to some sort of caching?

0

There are 0 best solutions below