I am successfully autoposting "posts" to a Facebook page, complete with pictures. However, when my Drupal content does not have an image (image URL) when the content is saved and autoposted, Facebook is grabbing a random image from my website's page and using it in the post.

I tried assigning an image URL in the "Default value" field in Structure > Facebook publication types > Post > Manage Fields for my Picture field, but it's not being passed along to Facebook via the Rules/Actions autopost. This is unfortunate because the presence of the "Default value" field seems like it would be the perfect set-up for use in passing along a default value.

I have also configured and reconfigured metatags-OG:image for Content and Global, and still, upon autoposting Facebook still uses whatever random image it finds on the webpage for the FB post.

Interestingly, when I use Facebook Debugger to re-scrape the content's URL, the OG:image assignment is being picked up. An all works as expected when my content's image field has a value.

Does anyone have other ideas on how to get a default image URL to be used in the "Set data value" action for my FB entity picture field? Or even, how to have Facebook post no picture if my content's image field is empty?

Comments

Rob T created an issue. See original summary.

Rob T’s picture

Issue summary: View changes
Rob T’s picture

I ended up working around the issue by creating 2 separate Rules with conditions based on whether the image field's "Data value is empty" or not. If not, I set the picture URL to my default image.