× Joomla Facebook Connect support forum

Topic-icon Problem with OG defaults

11 years 3 months ago #29192 by chramb1
I put a default entry for image in the open graph admin area. The URL is to my site's logo, so on any page that doesn't have an og:image generated, the default should show up (as per your docs).

On one of my pages, I put the code {SCOpenGraph image=} which appears to work... almost.

I now have TWO og:image tags on the page, one generated by the {SCOpenGraph} above, and one from the default. Removing the default entry on the back-end makes it go away.

The docs say that anything on the page will suppress the default, but it appears that it does not. Having two og:image tags on there causes Facebook to non-deterministically pick one, which is not good behavior.
The topic has been locked.
Support Specialist
11 years 3 months ago #29214 by alzander
Replied by alzander on topic Problem with OG defaults
The proper behavior for Facebook is that it should deterministically choose the first og:image tag in the head of the document for events that a picture is automatically included. If that's not happening, and Facebook is using either, that's a bug on their part. It's something I'm sure we can fix too, but we'd need to investigate more if this will be fixed by them or why it's happening at all.

Having multiple images does let a user select an image to use in cases where they are presented a choice, like when they do a status update and include a link to your page. Without that choice though, the first image is what's supposed to be used as long as it meets FB's criteria for image dimensions and other stuff.

Let us know if that's not the case,
Alex
The topic has been locked.
11 years 3 months ago #29223 by chramb1
Replied by chramb1 on topic Problem with OG defaults
Yeah, it doesn't always choose the first one.

But again, what's happening is contrary to your documentation. Your docs say that the default will only be used if there isn't another entry for the tag in question. In this case there is, yet the default is still used.

In my usage case, I don't want to let the user choose the image. I want only one on the page. Yes, I realize they can choose to show nothing, and that's fine - but it should only emit the one og:image tag.
The topic has been locked.
Support Specialist
11 years 3 months ago #29232 by alzander
Replied by alzander on topic Problem with OG defaults
We'll have to investigate further as to why Facebook is doing what it's doing.

Not sure why it's not being used, and we're hesitant to remove the default from the page because, on many sites, users set invalid photos (usually too small) and so the default is used. From a support perspective, having something show is better than nothing.

I'll let you know what we find. I'm honestly not sure how difficult it would be in our code to prevent the default from showing off-hand. Probably not overly difficult though.

Alex
The topic has been locked.