Topic-icon Wrong thumbnail image showing

Active Subscriptions:

None
13 years 7 months ago #27255 by otakushark
I just purchased JFBConnect in the hope that it would help solve a couple issues with the Facebook Recommend button on the Old Country Tailor site. The first issue is that the wrong image is being shown and posted to Facebook. I have "Use first image in article for default" set to Yes in JFBConnect's Social Graph tab, but the image I get when I click the button is the Pinterest logo from another module.



If I look at the source code for the page, it shows the following. The og:image and image are from the correct page, but neither of them are the first image.

meta name="og:url" content="oldcountrytailor.com/home-decor"
meta name="og:title" content="HOME DÉCOR—WE SEW CURTAINS, UPHOLSTER FURNITURE, AND MORE"
meta name="og:type" content="Article"
meta name="og:image" content="oldcountrytailor.com/media/k2/items/cach...d83df9ecd43b0_XS.jpg"
meta name="image" content="oldcountrytailor.com/media/k2/items/cach...d83df9ecd43b0_XS.jpg"
meta name="og:description" content=" Whether you are a professional interior designe}{SCOpenGraph image=http:..."

It's also grabbing some random code instead of the correct text, which is appearing in the og:description tag.
The topic has been locked.
Support Specialist
13 years 7 months ago #27259 by alzander
There's a few issues I see with your current configuration that are part of the problem:
* The og tags that you pasted above are not from JFBConnect. They are from another extension. Search for "og:" in the HTML and you'll find another group lower down, those are JFBConnect's.
* I know K2 just added some Open Graph support, but it doesn't seem.. great.. from initial testing. What version of K2 are you using?
* The img tag from JFBConnect looks like a proper image from your article, but it too also isn't the first. Not sure why that is as we simply ask K2 what the first image is. Do you have some extra extension or add-on that would be shuffling the images around?
* Our description for your page is pretty bad as well, but that looks to be for a few reasons. First, there is weird } a few words into the article, which is likely confusing some of our tag-replacement code and that's followed by a <script type="text/css" tag with some inline styles. Can you remove that inline CSS and move it somewhere else? That will likely help a lot.

Hope that helps get you started, but if not, or you need more help, just let us know!

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
13 years 7 months ago #27263 by otakushark
Thank you for your prompt and very helpful reply. There was indeed a leftover plugin from a different social addon. It was disabled, but was apparently still affecting the source for some reason. I uninstalled it and the og tags look correct now.

The reason the wrong image from the right page was showing up in the source was that it was defined as an image in that K2 item but was hidden. It was a leftover from one of my attempts with earlier packages to get the right image to show up.

I was using K2 v2.6.0, which came with the template purchased by the client. This was the first time I've used it in a site. I've updated it to the latest version, 2.6.1.

When I try hitting the Recommend button now, I'm still getting the same bad description and image as before, but I think that Facebook caches that info for awhile (is that right)? I temporarily turned on the Recommend buttons in one of the blog categories and checked a page that I hadn't recommended before. It showed the right thumbnail image and the correct text, but the link in the upper part of the FB post shows the app name and takes you to apps.facebook.com/oldcountrytailor instead of the page itself. Getting closer, though!
The topic has been locked.
Support Specialist
13 years 7 months ago #27269 by alzander
Facebook does indeed cache your Open Graph tags. They will refresh automatically every few days, but you can also use their awesome URL Debug Tool to 'see' what they see as well as immediately update their cache for that page:
developers.facebook.com/tools/debug

I'd highly recommend running a few pages through that tool to check what comes out and if it's what you would expect/hope for.

If it doesn't, let us know, and we'll gladly help look into things further!

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
13 years 7 months ago #27281 by otakushark
Thank you! That link helped immensely to check and update the images and descriptions more efficiently.

At this point, there are still two issues:

1. The link at the top of the Facebook posts "[name] recommends a link on Old Country Tailor." is still going to the app instead of the page itself. Is there a way to change this or just turn off that link completely?
2. The other one is that apostrophes are being displayed as & # 0 3 9 ; (without the spaces)
The topic has been locked.
Active Subscriptions:

None
13 years 7 months ago #27330 by otakushark
I was able to fix the issue with the apostrophes and ampersands showing up as a code by using a curly quote from copypastecharacter.com/punctuation instead and installing and activating HD-AndyAmp from www.hyde-design.co.uk/joomla-training/jo...-title-ampersand-fix

I'm still stuck on the link in the FB post going to the app page instead of the site. I tried adding via_url="oldcountrytailor.com" to the Open Graph overrides, but no luck. I really don't care if that link shows up at all; I just don't want peop going to the App page and wondering what is going on.
The topic has been locked.
Support Specialist
13 years 7 months ago #27348 by alzander
Sorry for not getting back sooner. There's a few odd things I see on your page. First, the Open Graph tags that are being inserted are *not* from JFBConnect. They're also being included wrong. The tags currently look like:
<meta name="og:url" content=....
However, Open Graph properties should not use 'name', they should use 'property', like:
<meta property="og:url" content=....
Can you disable/remove whatever is adding the OG tags currently and then enable JFBConnect's Open Graph integration?

Then, when you re-run the debug tool, you shouldn't get the warnings that the tags should be explicitly stated. Right now, Facebook is guessing at what the values should be because it's not really seeing the incorrect Open Graph tags you have on the page.

Hopefully that will help fix the URL issue, but we won't know until your tags are fixed.

Thanks, and good luck,
Alex
The topic has been locked.
Active Subscriptions:

None
13 years 7 months ago #27358 by otakushark
I did a side-by-side comparison of an old development version of the site and the current one to see if I had left any social plugins in place that might be causing the incorrect OG tags to appear. I couldn't find anything except that the old version uses K2 2.5.7 and I had updated the new version to 2.6.1 at your recommendation. I think that K2 is the source of those tags because the older version didn't have that issue, and when looking at the source of K2's sample Item page, the tags appear in the same order and general location. I'll try downgrading it tonight to see if that removes the tags.

I haven't been enabling JFBConnect on the site when I'm not working on it since it still had the link issue.
The topic has been locked.
Support Specialist
13 years 7 months ago #27373 by alzander
I knew K2 v2.6 added Open Graph tags, but I haven't done a lot of testing with it yet. I also didn't realize that (it seems) they add them improperly. I'm not sure if there's a way to disable the Open Graph tags in their configuration options, but if so, I'd disable them.

With the next release of JFBConnect, we're planning (though it hasn't been implemented yet) the ability to strip 'other' Open Graph tags that are not inserted by JFBConnect... leaving any ones that we aren't modifying. That should fix their 'bad' tags by removing them.

Until then though, I'm still unsure why our Open Graph tags aren't showing. At the least, I'd think there should be 2 sets of Open Graph tags on the page, JFBConnect's and K2's. Can you check the Social -> Open Graph tab in JFBConnect and make sure that Open Graph is enabled? If not, enable it. It's possible that Facebook will see our correct tags and continue ignoring the K2 ones and that may fix the problem.

If Open Graph is already enabled in JFBConnect, then we'll need to understand more of why our tags aren't showing at all.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
13 years 7 months ago #27375 by otakushark
I've confirmed that K2 v2.6.x is the source of the bad OG tags. I rolled the site back to the older version and they are no longer showing up in the page source.

The reason you didn't see the JFBConnect tags is that I was turning all that off when I wasn't actively trying to diagnose it. I've turned them on now, and the problem with the upper link is still present. It goes to the app instead of the site itself.
The topic has been locked.