Topic-icon Set default image for all kunena forum Facebook posts

I want the kunena forum facebook posts to simply be my logo.

How do I set the default image for the whole forum to just be my logo?

Thanks!
 
The topic has been locked.
Support Specialist
2 years 11 months ago #67279 by alzander
What you're looking to do is set the Open Graph image tag for your Kunena forum pages.

There's no setting in JFBConnect that will let you apply a specific image to a component. However, there are a few ways that can likely do what you're looking for:
1) Set a default image for all pages of your site. Do this in the Administrator -> JFBConnect -> Open Graph section. In 'Configuration' under 'Defaults' add a line like:
image=https://yoursite.com/images/logo.png
That will set an Open Graph tag to have your logo always be an option on all pages. If no other image is set on the page, the logo will be used, which likely will do what your looking for.
2) In a Kunena template file, add the following tag:
{SCOpenGraph image=https://yoursite.com/images/logo.png}
That will set the logo as an image tag, but only within pages that use that template file. This is more specific, but will take more testing to make sure it works on the pages you want.

I hope that helps, but if you need anything else, just let me know!

Thanks,
Alex
The topic has been locked.
I did exactly that. I am still not getting the picture in the Facebook post I want.

If you visit the link here it clearly is pulling the last post's moderator avatar picture.

www.scannerdanner.com/forum/post-your-re...h4E0vnr-Da32PKJMnB3E

I need it to pull the logo when it posts.

Thanks!
The topic has been locked.
Support Specialist
2 years 11 months ago #67285 by alzander
Ahh.. ok, I can see in the HTML where the problem is. If you look at the HTML of the page (View Source in your browser).. it looks like Kunena is setting it's own Open Graph tags:
<meta property="profile:username" content="Tyler" />
	
	<meta property="og:image" content="https://www.scannerdanner.com/media/kunena/avatars/users/avatar417.jpg" />
	<meta property="article:published_time" content="2016-07-10T17:57:12+00:00" />
	<meta property="article:section" content="Post your repair questions here" />
That og:image tag is right at the top and so Facebook would see that first.

You'll have to check if your Kunena template has an option to disable Open Graph tags. I just looked through Kunena's general configuration area and couldn't find such a setting, so it may just be a part of how it normally renders the page.

I'll have to look a little more, but for now, poke around and see if you can find a way to disable Kunena's open graph tags on your site.

Thanks,
Alex
The topic has been locked.
Alex, any more luck? I would really like to change this.
The topic has been locked.
Support Specialist
2 years 10 months ago #67295 by alzander
We looked through the Kunena code. There doesn't appear to be any way to disable their Open Graph support, so you'd need to make a manual change to their code to prevent their tags from being added.

To do so, edit the following file:
components/com_kunena/controller/topic/item/display.php
Around line 531, you'll see:
$this->setMetaData('og:image', $image, 'property');
You'll need to delete or comment out that line.

Once done, Facebook's cache make take some time to update, but I'd look at the HTML on the page to verify the incorrect og:image tag is gone.

I hope that helps, but if you need anything else, just let me know!

Thanks,
Alex
The topic has been locked.