Advertisement:

Author Topic: [Tip] Add Facebook Comments to your first post  (Read 64111 times)

Online Mick.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,065
  • Gender: Male
    • idesignSMF on Facebook
    • @idesign360 on Twitter
    • idesignSMF.com
[Tip] Add Facebook Comments to your first post
« on: March 28, 2011, 04:21:43 PM »
For SMF 2.0 series only!!

Open: Themes/default/index.template.php

Find:
Code: [Select]
<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
Add before:
Code: [Select]
        <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:
Code: [Select]
// Maybe they want to report this post to the moderator(s)?
Add after:

Code: [Select]
//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
« Last Edit: July 08, 2011, 12:01:31 PM by bluedevil »

Online Mick.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,065
  • Gender: Male
    • idesignSMF on Facebook
    • @idesign360 on Twitter
    • idesignSMF.com
Re: [Tip] Add Facebook Comments to your first post
« Reply #1 on: March 28, 2011, 05:22:03 PM »
Added moderation control  ;)

Offline pearpandas

  • Semi-Newbie
  • *
  • Posts: 26
    • Cutest Quotes
Re: [Tip] Add Facebook Comments to your first post
« Reply #2 on: March 29, 2011, 08:58:09 AM »
Thanks!  This looks awesome!

Offline waruna

  • Jr. Member
  • **
  • Posts: 241
  • Gender: Female
  • I am what i am
Re: [Tip] Add Facebook Comments to your first post
« Reply #3 on: March 31, 2011, 01:36:21 PM »
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

Offline Masterd

  • SMF Hero
  • ******
  • Posts: 3,921
  • Gender: Male
Re: [Tip] Add Facebook Comments to your first post
« Reply #4 on: April 18, 2011, 07:07:49 AM »
Nice one, bluedevil! ;)

Offline kingkingston

  • Full Member
  • ***
  • Posts: 650
  • Gender: Male
    • @ozzysportsforum on Twitter
    • aussiesportsforum.com
Re: [Tip] Add Facebook Comments to your first post
« Reply #5 on: April 18, 2011, 11:01:02 AM »
Could you add twitter to it as well ?

Offline Spale

  • Jr. Member
  • **
  • Posts: 115
  • Gender: Male
  • "Try not. Do or do not, there is no try..."
    • Miloš Spasić - web developer
Re: [Tip] Add Facebook Comments to your first post
« Reply #6 on: April 18, 2011, 04:28:04 PM »
Great tip, I will try this on my forum.

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

Offline Drenthe

  • Newbie
  • *
  • Posts: 1
Re: [Tip] Add Facebook Comments to your first post
« Reply #7 on: April 19, 2011, 09:59:53 AM »
That will show up only with the first post ?

Offline Masterd

  • SMF Hero
  • ******
  • Posts: 3,921
  • Gender: Male
Re: [Tip] Add Facebook Comments to your first post
« Reply #8 on: April 19, 2011, 03:39:15 PM »
Yes, it will show up only in the first post.

Offline elanvacations

  • Newbie
  • *
  • Posts: 1
Re: [Tip] Add Facebook Comments to your first post
« Reply #9 on: May 06, 2011, 11:49:19 AM »
Thanks!Looking good.

Elan,

Offline ozkamagra

  • Newbie
  • *
  • Posts: 1
Re: [Tip] Add Facebook Comments to your first post
« Reply #10 on: May 06, 2011, 01:20:42 PM »
Thanks Blue Devil ! Looks great, much apprecated.


Offline Weatherservice

  • Semi-Newbie
  • *
  • Posts: 79
    • WeatherService
Re: [Tip] Add Facebook Comments to your first post
« Reply #11 on: May 06, 2011, 02:48:17 PM »
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

Offline Weatherservice

  • Semi-Newbie
  • *
  • Posts: 79
    • WeatherService
Re: [Tip] Add Facebook Comments to your first post
« Reply #12 on: May 06, 2011, 03:00:33 PM »
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

Offline sunehrigal

  • Newbie
  • *
  • Posts: 5
Re: [Tip] Add Facebook Comments to your first post
« Reply #13 on: May 09, 2011, 08:40:25 PM »
Thanks i was looking for this ... it is really helpful

Offline Biology Forums

  • SMF Hero
  • ******
  • Posts: 3,763
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: [Tip] Add Facebook Comments to your first post
« Reply #14 on: June 06, 2011, 12:04:52 PM »
This doesn't work with 1.1.13 and Facebook integration mod.

Offline discountcode17

  • Newbie
  • *
  • Posts: 1
Re: [Tip] Add Facebook Comments to your first post
« Reply #15 on: July 07, 2011, 01:55:14 AM »
how to add facebook likes to our first post ,any scripts are there for that

Offline Shawanna

  • Newbie
  • *
  • Posts: 3
Re: [Tip] Add Facebook Comments to your first post
« Reply #16 on: July 08, 2011, 11:32:20 AM »
NICE TRICKS MAN ITS WORKING REALLY THANKS I AM PLAYING WITH MY FRIENDS WITH THIS CODE

Offline ~Dragon~

  • Jr. Member
  • **
  • Posts: 301
  • Gender: Male
Re: [Tip] Add Facebook Comments to your first post
« Reply #17 on: July 15, 2011, 07:47:34 AM »
Thank tutorial trick

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

Offline XHIBIT911

  • Jr. Member
  • **
  • Posts: 264
    • PSHomeSource.com
Re: [Tip] Add Facebook Comments to your first post
« Reply #18 on: May 27, 2013, 05:17:23 PM »
Great lil trick...but can we call images to post on facebook along with the comment also ?

Offline alisha2231

  • Newbie
  • *
  • Posts: 1
Re: [Tip] Add Facebook Comments to your first post
« Reply #19 on: July 13, 2013, 06:11:46 AM »
well its nice trick dear
surely i wil try it out

Offline Mr.Truckman

  • Semi-Newbie
  • *
  • Posts: 65
  • Gender: Male
    • mr.seui on Facebook
    • @hugmove on Twitter
    • Mr.Truckman
Re: [Tip] Add Facebook Comments to your first post
« Reply #20 on: October 27, 2014, 11:51:44 AM »
สวยงามมาก  ;D

Thanks!

Offline PMFE

  • Newbie
  • *
  • Posts: 8
Re: [Tip] Add Facebook Comments to your first post
« Reply #21 on: November 08, 2014, 02:06:03 PM »
This is a great feature. Definitely going to be adding it in some variation to my forum. Not sure I like how it looks in the layout... maybe some type of sidebar?

Offline Valeriane

  • Semi-Newbie
  • *
  • Posts: 11
  • Gender: Female
    • pages/MR-Ginseng/407461862677546 on Facebook
    • lancomega on GitHub
    • Mr Ginseng
Re: [Tip] Add Facebook Comments to your first post
« Reply #22 on: November 18, 2014, 05:03:59 PM »
haha, that's perfect, it works fine ;-)

Offline JarinTony

  • Newbie
  • *
  • Posts: 1
Re: [Tip] Add Facebook Comments to your first post
« Reply #23 on: January 28, 2015, 10:31:12 PM »
Very Good  :D thank you  :D

Offline kkabir

  • Newbie
  • *
  • Posts: 1
Re: [Tip] Add Facebook Comments to your first post
« Reply #24 on: March 02, 2015, 11:36:35 AM »
ohhhh that's nice tricks .thanks for shearing

Offline Igor.ns

  • Newbie
  • *
  • Posts: 6
Re: [Tip] Add Facebook Comments to your first post
« Reply #25 on: March 06, 2015, 09:24:53 AM »
Great tips, thank you for sharing Mick.

Offline rickysf

  • Newbie
  • *
  • Posts: 1
Re: [Tip] Add Facebook Comments to your first post
« Reply #26 on: June 19, 2015, 04:20:38 AM »
Good job and useful

Offline samk2824

  • Newbie
  • *
  • Posts: 8
Re: [Tip] Add Facebook Comments to your first post
« Reply #27 on: August 18, 2015, 10:34:50 AM »
This trick is amazing and I'm Going to apply too. 8)

Offline NoobDeveloper

  • Jr. Member
  • **
  • Posts: 331
Re: [Tip] Add Facebook Comments to your first post
« Reply #28 on: November 18, 2015, 01:37:02 AM »
Where can i see the demo ?

Offline yoctamail

  • Newbie
  • *
  • Posts: 1
Re: [Tip] Add Facebook Comments to your first post
« Reply #29 on: November 19, 2015, 01:33:45 AM »
It's Nice Trick. Thanks for sharing it with us.

Offline ZamaTata

  • Semi-Newbie
  • *
  • Posts: 25
Re: [Tip] Add Facebook Comments to your first post
« Reply #30 on: December 17, 2015, 02:57:42 AM »
does it still works on 2.0.1.?

anybody can share a links to demo please..