1
iDeologi
How To Insert Facebook Comment Plugin into AMS Article?
  • 2010/11/6 2:02

  • iDeologi

  • Just popping in

  • Posts: 16

  • Since: 2006/5/12


I'm trying to put Facebook Comments Plugin into my AMS Article Template file, but it's not working.

Comment Plugin not appear in the bottom of articles.

The Code like this:

<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=173169099366425&amp;xfbml=1"></script><fb:comments width="425"></fb:comments>
    <
div id="fb-root"></div>
    <
script>
      
window.fbAsyncInit = function() {
        
FB.init({appId'173169099366425'statustruecookietrue,
                 
xfbmltrue});
      };
      (function() {
        var 
document.createElement('script');
        
e.type 'text/javascript';
        
e.src document.location.protocol +
          
'//connect.facebook.net/ms_MY/all.js';
        
e.async true;
        
document.getElementById('fb-root').appendChild(e);
      }());
    </
script>


This code working properly when used in single file like this link:
http://ideologi.my/v3/modules/AMS/test2.html

But not working in Article Pages in AMS module. For reference, see this link, no comment plugin appear at the bottom of page:
http://ideologi.my/v3/modules/AMS/article.php?storyid=6

Thanks in advanced.

2
underdog
Re: How To Insert Facebook Comment Plugin into AMS Article?
  • 2010/11/6 7:46

  • underdog

  • Just popping in

  • Posts: 44

  • Since: 2007/6/21


On this page:
http://ideologi.my/v3/modules/AMS/article.php?storyid=6

I don't see this script included.
<script src="http://connect.facebook.net/en_US/all.js#appId=173169099366425&amp;xfbml=1"></script>


Maybe that's the problem.

3
mariane
Re: How To Insert Facebook Comment Plugin into AMS Article?
  • 2010/11/6 14:56

  • mariane

  • Theme Designer

  • Posts: 649

  • Since: 2008/1/11


try this code from fb developpers
http://developers.facebook.com/docs/reference/plugins/comments
the road of success is always under construction

4
iDeologi
Re: How To Insert Facebook Comment Plugin into AMS Article?
  • 2010/11/6 17:28

  • iDeologi

  • Just popping in

  • Posts: 16

  • Since: 2006/5/12


thanks for replies..

i've changed the code in ams article template file, to be like this:

<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=173169099366425&amp;xfbml=1"></script><fb:comments width="500"></fb:comments
    <
div id="fb-root"></div>
       <
script>
      
window.fbAsyncInit = function() {
        
FB.init({appId'173169099366425'statustruecookietrue,
                 
xfbmltrue});
      };
      (function() {
        var 
document.createElement('script');
        
e.type 'text/javascript';
        
e.src document.location.protocol +
          
'//connect.facebook.net/ms_MY/all.js';
        
e.async true;
        
document.getElementById('fb-root').appendChild(e);
      }());
    </
script>


same code in:

http://ideologi.my/v3/modules/AMS/test2.html

but not working in:

http://ideologi.my/v3/modules/AMS/article.php?storyid=6




5
iDeologi
Re: How To Insert Facebook Comment Plugin into AMS Article?
  • 2010/11/7 6:45

  • iDeologi

  • Just popping in

  • Posts: 16

  • Since: 2006/5/12


problem solved

just add this code to theme.html

<html xmlns="http://www.w3.org/1999/xhtml"
      
xmlns:fb="http://www.facebook.com/2008/fbml">

  <
div id="fb-root"></div>        <script>       window.fbAsyncInit = function() {         FB.init({appId'173169099366425'statustruecookietrue,                  xfbmltrue});       };       (function() {         var document.createElement('script');         e.type 'text/javascript';         e.src document.location.protocol +           '//connect.facebook.net/ms_MY/all.js';         e.async true;         document.getElementById('fb-root').appendChild(e);       }());     </script>


And
<fb:comments width="500" title={$story.title} notify="true" reverse="0" publish_feed="1"></fb:comments>

in template article.

Login

Who's Online

150 user(s) are online (94 user(s) are browsing Support Forums)


Members: 0


Guests: 150


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits