News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

[Tip] Add Facebook Comments to your first post

Started by Mick., March 28, 2011, 04:21:43 PM

Previous topic - Next topic

Mick.

For SMF 2.0 series only!!

Open: Themes/default/index.template.php

Find:
<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />

Add before:
        <meta property="fb:admins" content="YOUR FACEBOOK USER ID NUMBER GOES HERE"/>

Replace YOUR FACEBOOK USER ID NUMBER GOES HERE with your facebook ID.

Open:
Themes/default/Display.template.php

Find:
// Maybe they want to report this post to the moderator(s)?

Add after:

//Facebook Comments
    if ($message['id'] == $context['topic_first_message'])
echo'
               <br /><br />
<div id="fb-root"></div><div align="left"><script src="http://connect.facebook.net/en_US/all.js#appId=APP_ID&amp;xfbml=1"></script><fb:comments href=', $scripturl, '?topic=', $context['current_topic'], ' num_posts="2" width="500"></fb:comments></div>';
//Facebook Comments



Test it here: http://www.bluedevilcustoms.com/index.php/topic,217.msg573.html#msg573

Mick.



waruna

Hi, sorry if off topic. But may you teach me how to add facebook like button in every post made?

Thanks in advance.
Trust of Lust


kingkingston


Spale

Great tip, I will try this on my forum.

Thanks bluedevil. ;)
"Failure is only the opportunity to begin again more intelligently." - Henry Ford

Drenthe


Masterd



ozkamagra

Thanks Blue Devil ! Looks great, much apprecated.


Weatherservice

Also used in my website, check example: http://www.weatherservice.be/index.php

I do get one error: can u check it?

Regards
Unique weathercapture: check www.weatherservice.be

Weatherservice

Error like this: Warning: 'http://www.weatherservice.be/index.php?topic=27 is unreachable.'

People can write in the free space but we don't see their reactions..
Unique weathercapture: check www.weatherservice.be

sunehrigal

Thanks i was looking for this ... it is really helpful

Biology Forums

This doesn't work with 1.1.13 and Facebook integration mod.

discountcode17

how to add facebook likes to our first post ,any scripts are there for that

Shawanna

NICE TRICKS MAN ITS WORKING REALLY THANKS I AM PLAYING WITH MY FRIENDS WITH THIS CODE

~Dragon~

Thank tutorial trick

perfect on page I learn it  ;D
Please do not PM or email, Thank respond please post fast to SMF!

XHIBIT911

Great lil trick...but can we call images to post on facebook along with the comment also ?

alisha2231

well its nice trick dear
surely i wil try it out

Advertisement: