Topic-icon Failing to pull and display OG image

5 years 11 months ago #63850 by fb_564705464
Please advise. Problem since updating to 7.2.4. Worked fine prior.
The topic has been locked.
Support Specialist
5 years 11 months ago #63852 by alzander
Can you give us an example URL that we can understand further what you mean? You can post an example here or Private MEssage me by clicking the mail icon under my name to the left.

If you can explain a bit more that would help as well:
* Is no image being pulled, or the wrong image?
* Are you specifically setting an Open Graph tag for the image, or letting JFBConnect set it automatically?
* If you look at the HTML on the page, is the og:image tag being included?
* Can you run your URL through the Facebook URL Debug Tool to see if there are any warnings or errors displayed?

Once we can see the page, that will help as well with the above details.

Thanks,
Alex
The topic has been locked.
5 years 11 months ago #63862 by fb_564705464
steampunkpipeworks.com
The topic has been locked.
Support Specialist
5 years 11 months ago #63873 by alzander
On the home page of your site, there is no og:image tag specified. In the main article that you have on that page, if I click into it, I am able to see the og:image tag set properly.

Can you tell me what type of menu item you are using for your home page and how you are expecting the og:image tag to be set? From what I can gather, it's a blog or featured layout view. In that case, you'll need to either set an image for the category or use the JFBConnect Easy Tag to set the image for the page, like:
{SCOpenGraph image=http://yoursite.com/link-to-image.jpg}
Finally, you can also set a default image to be used on all pages of your site in the JFBConnect -> Social Meta area. That's great for a logo or something else generic that could work on any page if one can be set automatically.

I hope that helps with some ideas, but if not, or you think there is an issue with the home page menu item, let us know any more details you can so we can understand further.

Thanks,
Alex
The topic has been locked.
Support Specialist
5 years 11 months ago #63874 by alzander
I forgot to mention that I tried to login to the admin area to confirm some of the questions above but the username/password you sent didn't work.

I'm not sure how we'll be able to fix this with access though as I think you'll need to set an image somewhere on your own, and I won't know which to set.

Thanks,
Alex
The topic has been locked.
5 years 11 months ago #63915 by fb_564705464
It worked until there was an update and I'd never had to set it before. It simply pulled from whichever article any applicable image (most of which would be the only image TO pull).
The topic has been locked.
5 years 11 months ago #63916 by fb_564705464
Also, my apologies for the login/pass. Simply drop the letter "m" from the username I sent (typo).
The topic has been locked.
Support Specialist
5 years 11 months ago #63917 by alzander
Shawn,
Your home page menu item is set to "Featured Articles". JFBConnect would not automatically set an image for that type of menu item. A "Featured Articles" menu type indicates that the articles will change over time. The og:image tag is not supposed to change over time. It's supposed to be a representation of what that page is, and always will be.

For your home page, you wouldn't necessarily want an og:image from whatever is the current featured article. You really should set a specific image for your homepage, like your page's logo or something similar that can always represent your home page.

I honestly don't know how it worked before, but JFBConnect does not have any code to set an og:image tag on feature article menu items. To get it going, I'd recommend either of:
* Setting the {SCOpenGraph image=http://link-to-image} tag in a custom module that shows on that page
* Use the Open Graph defaults configuration area to set a backup image to use on all pages
* If you only have one featured article (and just are trying to use that as your home page content and don't expect it to change), change the menu item to be a single article type and then JFBConnect will use the image from that article automatically.

I hope that helps!
Alex
The topic has been locked.
5 years 11 months ago #63928 by fb_564705464
It isn't the home page I'm concerned with as much as the individual items which also use a shopping cart (J2Store). They're presented as individual articles when clicked from the menu. The client shares them on social media individually from a mobile phone and isn't savvy with computers. We'd been happy, until the last update, for him to be able to click share, and for it to pull the picture from one of the lamps and the beginning of its description. Upon the last update, it stopped fetching the lone image specific to that item so he gets text only and, as you could expect, traffic has fallen as nobody is clicking with the picture lacking.
The topic has been locked.
Support Specialist
5 years 11 months ago #63933 by alzander
I'm unsure why you posted the home page as the problem area if it was really a shop page that was the problem. We don't know your site, so pointing us in the right direction helps us narrow down and investigate things faster.

As for the shop pages, I'm not sure how those pages are created, but if I look at the HTML for a page, like the below, there is no image in the content at all:
dimmer-lamps/the-double-head-floor-lamp.html
It seems like the page is loading and then something else is pulling in the image of the item using Javascript. If I look at the Joomla article for the item, there aren't images set in the content/images area. The J2Store tab does have the image set, but that's separate from standard Joomla content and JFBConnect doesn't know about any details you've set in there.

The way our Open Graph - Content plugin works is to scan the HTML output that the article is going to display. In that HTML, we search for an image, or use the Primary Image set on the article. Since whatever is happening is definitely happening outside of the standard HTML output, there's nowhere that our Open Graph plugin can find the image.

If it worked previously, then something has changed elsewhere. J2Store may have changed how it loads its images into the page by doing it via Javascript instead of inserting them in the HTML directly. When the page loads, I see a loading indicator of a few dots, which could be the process of using Javascript to ask J2Store for the image.

I don't know J2Store, but if there's someway to have it insert the image into the HTML so that the Joomla content plugins can execute their onBeforeContentRender function normally, that should get things going.

Having the image loaded via Javascript is doubly bad because Facebook can't even scan the page to guess at an image to use. It simply sees no image as well.

I hope that helps explain, but if you need anything else, please let us know.

Thanks,
Alex
The topic has been locked.