Support Forums

Facebook Comments integration

This is a discussion on Facebook Comments integration within the Modules / Plugins / Modifications forums, part of the Developer Forums category; v4.0.9 Developer Hi guys! I'm trying to integrate Facebook Comments to every single ad in my site. The problem is ...


Go Back   68 Classifieds Forums > Developer Forums > Modules / Plugins / Modifications

Reply
 
Thread Tools Display Modes
Old 11-17-2011, 05:16 PM   #1
Customer
 
Join Date: May 2008
Posts: 68
Rep Power: 19
SecondShoe is just really nice SecondShoe is just really nice
Question Facebook Comments integration

v4.0.9 Developer

Hi guys!
I'm trying to integrate Facebook Comments to every single ad in my site. The problem is that I can't figure out what to write in "URL to comment on" field at https://developers.facebook.com/docs...ugins/comments where the code is generated. I bet someone here knows what is the right URL format.
10x in advance!
SecondShoe is offline   Reply With Quote
Old 11-17-2011, 05:50 PM   #2
Developer & Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,385
Rep Power: 73
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

Quote:
Originally Posted by SecondShoe
v4.0.9 Developer

Hi guys!
I'm trying to integrate Facebook Comments to every single ad in my site. The problem is that I can't figure out what to write in "URL to comment on" field at https://developers.facebook.com/docs...ugins/comments where the code is generated. I bet someone here knows what is the right URL format.
10x in advance!
That is not going to work for individual dynamic pages. The field in the form that you referred to is expecting a static url. The Facebook API isn't going to be able to parse variables on your site such as smarty variables. The URL that shows in your browser while viewing the individual listing page could be inserted in that form, but again, that is only going to be for that one page.

In addition, this would be irrelevant on an individual listing page unless you are allowing posts to Facebook from and referring to that individual page as well.

As a suggestion and I have done this on several client sites, is to use it in your layout.tpl main template in the side column. I've done this for either the clients Facebook page and comments as you are attempting to do here, except that it is for the site as a whole, not individual listing pages.

Think your plan and plan your think
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2,5.0)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote
Old 11-17-2011, 08:38 PM   #3
Customer
 
Join Date: May 2008
Posts: 68
Rep Power: 19
SecondShoe is just really nice SecondShoe is just really nice
Default

10x for the answer Mike-N-Tosh!

I just found very simple solution to get the job done.
Code:
<script language="javascript" type="text/javascript">
document.write("<div id='fb-root'></div><fb:comments href='"+ document.location.href +"'  num_posts='10' width='735'></fb:comments>");
</script>
<script src='http://connect.facebook.net/en_US/all.js#xfbml=1'></script>
I added that code to my viewlisting.tpl and it actually works like a charm. Different comments for every single ad. I never thought it would be that simple.

Last edited by SecondShoe; 11-17-2011 at 08:41 PM.
SecondShoe is offline   Reply With Quote
Reply

Tags
comments , facebook , facebook comments

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comments Appreciated danth6961 Site Critiques 2 05-05-2010 07:23 PM
Looking for comments Shill Site Critiques 7 04-06-2009 08:24 AM
comments and shoutbox extension or modules? alvinjohn Technical Support 0 09-09-2008 02:08 AM
Comments? MS-FSBO garysmith Site Critiques 0 05-15-2006 08:37 AM


All times are GMT -4. The time now is 02:13 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0