Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
in Plugins by
about facebook comment pluging..

i have r facebook comment HTML and java scrypt code.. but i dont now where is the put this.. then i want to put this file. please who can help me to put in to file.

how can i make this?
Q2A version: v1.3

2 Answers

0 votes

You can do this by crating a new plugin with  a leyer http://www.question2answer.org/layers.php . 

You need to override the q_view_main() to fit your needs . 


Also here is the functions which are responsible for showing comments and comment form . Override them as per your needs . 

c_form -- For comment form

c_list -- For showing comment thread


Hope this helps

hello Ami..!
im not r developer.. then i can't understand this moment..
please can you explain more?
(with step by step)
+1 vote

Here is my plugin for my own page. You should modify to make use of it.


Modify the code in the plugin main file: qa-plugin/facebook-comment-box/qa-facebook-comment-box-layer.php

class qa_html_theme_layer extends qa_html_theme_base
    public function body_suffix()
        $this->output('<div id="fb-root"></div>');
                    <script>(function(d, s, id) {
                    var js, fjs = d.getElementsByTagName(s)[0];
                    if (d.getElementById(id)) return;
                    js = d.createElement(s); js.id = id;
                    js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.8&appId=<your facebook app id here>";
                    fjs.parentNode.insertBefore(js, fjs);
                    }(document, \'script\', \'facebook-jssdk\'));</script>');

    public function main_parts($content)
        //$q_view = @$this->content['q_view'];
        $q_view = @$content['q_view'];
        // link title where appropriate
        $url = isset($q_view['url']) ? 'http://your_page.com'.substr($q_view['url'],2) : 'http://your_page.com';
                    <div class="fb-comments" data-href="'.$url.'" data-numposts="5"></div>

If you still don't know how to do, please google search for "how to register a facebook appid for your page" and "how to add a facebook comment box". And, if needed, "how to install a plugin" also (search in this forum).

visit my page: kiwidic.com for example