Links to forum on facebook show no thumbnails or images

Started by Janden, April 20, 2013, 02:43:50 AM

Previous topic - Next topic

Janden

This might seem like a silly question, but I know people on FB click on more things that have pretty pictures. What I've noticed is that any time I like to my forum, either the forum itself or a certain topic, FB only displays the link. It would be cool if there was a way to make it show something, an icon or a logo, anything. Does anyone know how to do this?

Here is a screenshot to show what I'm talking about.

William Wolfe

William Wolfe

Kindred

yes, that is completely correct.

It has to do with how facebook pulls thumbnail images and how SMF renames images to use a hashed filename and no extension.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

winniethepooh

Hello Janden, I have a simple solution for you. open notepad and paste this code. replace the description, url of your index, logo, and slogan with your stuff. save it as "whateverpage.html" upload both the html page and the logo image you made to the same directory of your site, preferably the root directory of your account.

<html><head><meta name="description" content="enter a short description of your site here. don't use more than 200 charachters or facebook wont pick it up."><meta http-equiv="refresh" content="1;url="http//yoursite.com/yourindexpage.php" /></head><body><center><h1>redirecting to the forum</h1></center><center><image src="yourlogo.png" alt="your site slogan"></img></center></body></html>
After you have done this. instead of submitting your normal url to facebook, submit http://yoursite.com/whatteverpage.html instead. if all goes well, you will have a link that once clicked will bring you to your forum.

Tip: You can even jazz it up with some css inside a of a <style></style> container.
"But I'm tryin' Ringo.I'm tryin' real hard to be the Shepherd."

Janden

There's no mod, I'm just posting the link on facebook. You would think it would at least put the site logo in there or something. I get not having images from the forums show up, but at least a default icon would be great. If you look at this screenshot, this forum comes up with an image when I put the link into facebook.

Kindred

there is a mod which adds the OG codes...which will tell facebook what to use.

and pig...  that's not a particularly good or useful idea... especially since the users will just be pasting the link from their browser into facebook.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

winniethepooh

Quote from: Kindred on April 20, 2013, 02:54:39 PM
there is a mod which adds the OG codes...which will tell facebook what to use.

and pig...  that's not a particularly good or useful idea... especially since the users will just be pasting the link from their browser into facebook.


well, since you said their is a mod... would you care to share it with us?
"But I'm tryin' Ringo.I'm tryin' real hard to be the Shepherd."

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

winniethepooh

"But I'm tryin' Ringo.I'm tryin' real hard to be the Shepherd."

Janden

I've looked through the Facebook mods about a million times. I have no idea which one of those is the one you're referring to.

TheListener

Quote from: Janden on April 20, 2013, 07:05:17 PM
I've looked through the Facebook mods about a million times. I have no idea which one of those is the one you're referring to.

I believe Kindred has given you the link so you can decide for yourself which would best suit you.

Janden

I would have to try out ALL of those mods to find that one that puts a picture on Facebook. Since none of them have that listed as one of the capabilities. Why didn't he just give me a link to Vbulletin? Or phpbb? I get that it was an attempt at being helpful, but it was only slightly better than "Let me google that for you."

Arantor

What he's trying to suggest is that spending a little time searching would yield answers.

I'll save you the effort, though, and point you at http://custom.simplemachines.org/mods/index.php?mod=3153 which does claim to do so.

TheListener

Quote from: Janden on April 20, 2013, 07:12:36 PM
I would have to try out ALL of those mods to find that one that puts a picture on Facebook. Since none of them have that listed as one of the capabilities. Why didn't he just give me a link to Vbulletin? Or phpbb? I get that it was an attempt at being helpful, but it was only slightly better than "Let me google that for you."

So we 'volunteers' are supposed to sit and do the work for you? Can you imagine how impossible it would be if we did this for everyone?

I'm not exactly sure it can be done forum side anyway as I was under the impression that facebook did this automatically.

:)

EDIT: Thanks Arantor.

winniethepooh

Quote from: Old Fossil on April 20, 2013, 07:07:37 PM
Quote from: Janden on April 20, 2013, 07:05:17 PM
I've looked through the Facebook mods about a million times. I have no idea which one of those is the one you're referring to.

I believe Kindred has given you the link so you can decide for yourself which would best suit you.
Those links have nothing to do with what he wants. He wants to post links to his site with pictures on facebook for his friends to see and click on. none of those links provide that. i think my script is a good starting point. fwiw, i used this simple meta refresh front page to index with google. it doesn't take a freaking rocket scientist google and facebook can't dig into your themes directory for your logo image, because smf;security features do not allow it!!!! alternatively to the script i provided that is so easy a caveman can do it, is just placing a logo in your /root directory
"But I'm tryin' Ringo.I'm tryin' real hard to be the Shepherd."

mashby

Actually winniethepooh (aka many other names just today), the link Arantor provided (which was included in the list of ones provided by Kindred) does what Janden wants. :)
Always be a little kinder than necessary.
- James M. Barrie

Janden

Indeed, I actually did search forever for this answer, which is why I asked here in the first place. But the answer I got was "search around." And looking at that mod, I see how it can work under certain circumstances (such as if someone likes the topic), but would that work still if someone just threw a link into their facebook status? That is what I was wanting to know. Do I expect volunteers to "do all the work for me"? No. Is every suggestion given to me going to actually answer the question? No. Am I going to point out that something wasn't helpful at all? Sure. Did I say I understand that it was meant to be helpful? Yes. Thanks for your suggestions, everyone.

Arantor

Quoteit doesn't take a freaking rocket scientist

It's a good thing you're not a 'freaking' anything then, isn't it?

Oh, and no, your script is not a good starting point. It'll screw up SEO and it won't even provide the meta og tag that will definitely give FB something to look at.

(For reference, FB will attempt to use images if it finds some on the page that are suitably sized and suitably accessible. Most of the time, that just isn't the case, so it doesn't show anything.)

Quotebut would that work still if someone just threw a link into their facebook status? That is what I was wanting to know

I thought the mod's page explained that fairly well...

winniethepooh

#18
Quote from: mashby on April 20, 2013, 07:25:19 PM
Actually winniethepooh (aka many other names just today), the link Arantor provided (which was included in the list of ones provided by Kindred) does what Janden wants. :)

Quote from: Arantor on April 20, 2013, 07:35:10 PM
Quoteit doesn't take a freaking rocket scientist

It's a good thing you're not a 'freaking' anything then, isn't it?

Oh, and no, your script is not a good starting point. It'll screw up SEO and it won't even provide the meta og tag that will definitely give FB something to look at.

(For reference, FB will attempt to use images if it finds some on the page that are suitably sized and suitably accessible. Most of the time, that just isn't the case, so it doesn't show anything.)

Quotebut would that work still if someone just threw a link into their facebook status? That is what I was wanting to know

I thought the mod's page explained that fairly well...
facebook doesn't need the og meta tag


edit: i've put my link far enough in my mouth. ehow claims to show how to do this. good luck OP. Arantor and Kindred. you were right. My apologies.


http://www.ehow.com/how_4938148_thumbnail-show-up-facebook-share.html
"But I'm tryin' Ringo.I'm tryin' real hard to be the Shepherd."

Janden

The mod's page says this:

"This Mod allows you to add Facebook like button at prominent location on your forum along with open graph and with option to specify your own image which will be shown along with your shared link on Facebook , you can use your logo as shared image which will help you to spread your name. With Open Graph Support it lets you to use features like Facebook Insight so that you can check how many people Liked and Shared your link on facebook etc."

This makes it seem as though this capability is delivered only via the prominent like button. It's incompatible with 2.04 anyways, at least that what it tells me when I try to install it. What mod is this site using?

Arantor

-sigh- I guess I need to explain it in yet more detail from my previous post.

This site doesn't use any mods. It just so happened that on the one page you tried, there is a picture that FB happened to find that was within the rules it has.

Try it from a regular thread page, the only things it'll pull up, if it pulls anything up are the logo as on the page and the avatars. Though frequently it won't get those either.

Janden

So how did it work from the this forum's main page? I'm sorry, but none of this is making any sense to me.

Arantor

You put the link in. Facebook visits the page. It looks for any images it can find. If it finds any it can use, it will provide them.

It just happened to find one image that was within its criteria.

As in, you put in http://www.simplemachines.org/ and of all the images, all it found was that image in the middle of the page. Not the smaller images like the star or the paint roller, or the site logo for that matter. Just that one image in the middle of the page.

Janden


Kindred

http://wiki.simplemachines.org/smf/How_can_I_install_a_mod_that_doesn%27t_work_in_my_SMF_version

and - if there is an og tag defining a site image, it will be used...  so - yes, it adds the like button, but since the OG tag is present it will be used even with a pasted link. (probably - facebook changes their interface regularly and sometimes without major notice)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

AZMazda3

Sorry for posting on an old thread, but I want to add that since last this was started SMF has been updated there are many things different with 2.0.7 and Facebook OG. I have been searching this community for others on how they easily added OG tags for FB without a mod, and keep coming to this thread. Other than explaining what OG and Facebook does in a way, I haven't found an answer.

I do not want to add anything but the ability to post links on FB and pull up pertinent links and info, and images. None of the mods will just do this. I don't want FB logins, and do not need a 'Like" button. I just want to add the metatags and have the ability to change them when I want.

So IF anyone has done this, please share how they did it.

DBCoop

i've been searchig all day for the same anwswer.. I am posting a link to friends on Facebook of my webforum and the image it uses to display on facebook is an ad-banner and not the forum logo. I tried finding meta tag option in the forum settings to no avail, and Ive searched the forums and mods thoroughly for an answer but all of them are invalid, or out of date and not compatible with 2.0.7

looking for an answer to add OG meta tags to my SMF forum.. Any help would be great! thanks

Kindred

you would have to use one of the facebook mods... or edit your index.template.php to add the og tag directly
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

iulian X

Quote from: Janden on April 20, 2013, 02:43:50 AM
This might seem like a silly question, but I know people on FB click on more things that have pretty pictures. What I've noticed is that any time I like to my forum, either the forum itself or a certain topic, FB only displays the link. It would be cool if there was a way to make it show something, an icon or a logo, anything. Does anyone know how to do this?

A simple solution to this problem.
Add a picture in the message and set the picture to be very small.
[img width=6 height=4]http://domain/picture.png[/img]

Paste the link here to fefresh facebook image cache
https://developers.facebook.com/tools/debug/

Kindred

That, however, requires you to manually add a picture to EVERY POST...  that is not really a sustainable way to do things....

The proper way to do it is to add the OG tags.

Using a mod is the best way (I have no idea why some people are so obsessed with "give me a way that is not a mod" (what do you think your MANUAL changes are other than an undocumented mod? At least, with a mod, you have a clear record of what changes were made.)
There are several mods, at this point, which properly add the OG tags.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

crimpson

#30
I have the answer!

Make your logo image 1,200 x 627 and put it wherever you like in your website directory.
use facebooks sharing debugger and OG debugger tools https://developers.facebook.com/tools/debug/sharing/
and https://developers.facebook.com/tools/debug/og/object
enter in your website url when you're ready to test.

The file you want to edit is in /Themes/yourcurrenttheme/index.template.php
scroll to the bottom of the head, the last line before it ends.
You need to add facebooks "meta og" tags that point to the image and description you wish to use.

This is what it looks like.

<link rel="index" href="', $scripturl, '?board=', $context['current_board'], '.0" />';

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'];

echo '

<meta property="og:image" content="http://www.yourwebsite.com/fblogo.jpg" />
</head>
<body>';

There will be other "link rel=" tags above that.
This is where you can put all of your facebook OG tags for website description, image' whatever.
Here's all the OG tags: http://ogp.me/
Any time you make changes to the OG tags or your preview image, you need to tell facebook to "fetch new scrape information" using their debugger tools. I'm sure there's lots of ways you can use these tags, for example: It's probably possible to point the image tag at a directory instead of one particular image, or multiple image tags to choose from. haven't played with this yet.

Advertisement: