Question about Facebook

perrie
@perrie
7 years ago
435 posts
Hi everyone!
Is there a way to have facebook display a blurb from from the actual discussion rather than a generic blurb about the site? Right now that is all I got it to do (and that took forever to figure out).
Thanks,
Perrie~
updated by @perrie: 08/08/17 12:30:18AM
michael
@michael
7 years ago
7,746 posts
What facebook shows is determined by what is found in the og:tags in the source code for the page. On the item detail pages these are set. You can adjust them by adjusting the item_detail_meta.tpl

For other pages you can use the meta tag module to set the og:tags as you want them.
perrie
@perrie
7 years ago
435 posts
Michael,
I am a bit of a dummy about this.. so could you break it down for me a bit more. It took me forever just to get the og tags to work so I am scared to mess with them..

And what is the meta tag modele?
michael
@michael
7 years ago
7,746 posts
Hard to break down any more, I don't know the situation. Like what page you're trying to add it to.

Meta Tag module:
https://www.jamroom.net/the-jamroom-network/networkmarket/ss=meta
perrie
@perrie
7 years ago
435 posts
I would like it to generate the headline to the discussions that the site is talking about. Does that help?
michael
@michael
7 years ago
7,746 posts
not really. got a URL?
perrie
@perrie
7 years ago
435 posts
OK so I would like it, if a discussion like this:
http://thenewstalkers.com/community/discussion/30900/north-korea-says-ready-to-sink-us-aircraft-carrier-with-single-strike
would show up with the title of the discussion, instead of the attached fb attachment and where it says:
"Your source for discussing the latest news and headlines from around the world" it would be replaced with the title of the article. Is that a bit clearer?
alt=
K_K
@k-k
7 years ago
95 posts
perrie:
OK so I would like it, if a discussion like this:
http://thenewstalkers.com/community/discussion/30900/north-korea-says-ready-to-sink-us-aircraft-carrier-with-single-strike
would show up with the title of the discussion, instead of the attached fb attachment and where it says:
"Your source for discussing the latest news and headlines from around the world" it would be replaced with the title of the article. Is that a bit clearer?
That is strange, for my site the FB share has always used the title of the thread as the text with the first words of the post.

Also as a tip, when you get it sorted, if you add attached file to first post, it is used as the Facebook share picture. If there is no attached picture, then it uses the default picture.
perrie
@perrie
7 years ago
435 posts
K-K,
How did you setup your facebook account?
And what file should we attach first? Are you talking about using a photo in the article so that I don't end up with my logo?
alt=
K_K
@k-k
7 years ago
95 posts
perrie:
K-K,
How did you setup your facebook account?
And what file should we attach first? Are you talking about using a photo in the article so that I don't end up with my logo?
I don't think you need set any special Facebook account for this, just the normal module for the "Share This" icons as you already have and it is connected to Facebook.

Now when you post a thread without attached picture, the Facebook share uses the default picture in ACP > modules > forum > images.

If you use the "Attach File" button like here in Jamroom forum (you might not have set it to be available?) that file is used as the picture for the share.

At least that is how it works for me, using cloned Ninja skin.
derrickhand300
@derrickhand300
7 years ago
1,353 posts
Edit this to suit your needs- then add it to the HEAD section of the page ( you may have to use metatag manager for this in your situation
<!-- Facebook OG -->
    <meta id="ogtitle" property="og:title" content="TITLE I WANT DISPLAYED"/>  
    <meta id="ogdescription" property="og:description" content="DESCRIPTION OR BLURB I WANT DISPLAYED"/>
    <meta id="ogimage" property="og:image" content="URL OF THE IMAGE I WANT DISPLAYED- IF USING A JAMROOM IMAGE END THE URL WITH /800 WHICH SIZES IT CORRECTLY FOR THE FACEBOOK POST"/>
    <meta id="ogurl" property="og:url" content="URL OF THE WEBPAGE WHERE THE BLURB IS LOCATED"/>

If you want to use a photo in the article- use CHROME and right click on the image and select COPY IMAGE ADDRESS AND PASTE THAT URL HERE
 <meta id="ogimage" property="og:image" content="URL OF THE IMAGE I WANT DISPLAYED- IF USING A JAMROOM IMAGE END THE URL WITH /800 WHICH SIZES IT CORRECTLY FOR THE FACEBOOK POST"/>

Your article can have many images but the one facebook will use will be the one you right click on and get the url


After you have done that- copy the url of the page you added it to and paste it here
https://developers.facebook.com/tools/debug/
Click DEBUG then click SCRAPE twice...now you can SHARE the post to Facebook and it should display correctly...

Might sound complicated but it takes maybe 60 seconds to complete for each new page- have had to do it this way ever since joining JR
updated by @derrickhand300: 04/26/17 05:40:54PM
derrickhand300
@derrickhand300
7 years ago
1,353 posts
perrie:
OK so I would like it, if a discussion like this:
http://thenewstalkers.com/community/discussion/30900/north-korea-says-ready-to-sink-us-aircraft-carrier-with-single-strike
would show up with the title of the discussion, instead of the attached fb attachment and where it says:
"Your source for discussing the latest news and headlines from around the world" it would be replaced with the title of the article. Is that a bit clearer?

ok to get you started- for the above- you would add this to your HEAD section of the page
<!-- Facebook OG -->
    <meta id="ogtitle" property="og:title" content="North Korea Says Ready To 'Sink US Aircraft Carrier With Single Strike"/>  
    <meta id="ogdescription" property="og:description" content="North Korea is 'ready to sink' a US aircraft carrier heading for the peninsula, state media have said. A commentary in the Rodong Sinmun newspaper warned that the USS Carl Vinson could be sunk 'with a single strike'."/>
    <meta id="ogimage" property="og:image" content="http://thenewstalkers.com/upimg/image/upimg_file/13072/512/800"/>
    <meta id="ogurl" property="og:url" content="http://thenewstalkers.com/community/discussion/30900/north-korea-says-ready-to-sink-us-aircraft-carrier-with-single-strike"/>




Likely if using sitebuilder you would add it by clicking PAGE CONFIG then adding it to the HEAD section there...run it through the Facebook debugger a few clicks and its done

NOTE something to remember is that in the title and description you will need to replace an " with just a single ' ...reason is if you use " it will omit stuff...because FB OG Tags use " for specific stuff...

updated by @derrickhand300: 04/26/17 05:48:15PM
michael
@michael
7 years ago
7,746 posts
That URL corresponds to the jrDiscussion module.

The jrDiscussion module does not have the item_detail_meta.tpl file to produce the og:tags.

I've added it to the next version, Version 1.1.0, which will be released when jr6.1 gets out of beta.
derrickhand300
@derrickhand300
7 years ago
1,353 posts
Yes but I think if she adds the above code to the head it will work as she wants for now
perrie
@perrie
7 years ago
435 posts
Sorry for dropping this topic, but I was in the middle of a move.
Derrick, when I look at the code you gave to put in the head, it has a specific title name. Is that just an example? What I need it to do is automatically pick up the title name, when someone hits the share button.
derrickhand300
@derrickhand300
7 years ago
1,353 posts
For each article you have to add the above..if you add that code to the head of the page each time someone shares that page what they will see is whats in that code...you could change the title to PINK UNICORNS and regardless of whats on the page when they share it the title will be PINK UNICORNS
Same for the description...write what ever YOU want shared
Then add the page url and the url of the image you want shared ( usually its on the page)