Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Facebook Comments Box for Each Profile

Quote

Ankur wrote:

Code Updated below to the Updated version of Comments Box :

Add it as either Lower Center or Upper Center Panel : Remember to replace XXXXX with your APP ID or XID. In new Interface, Old Comments may Lost !

[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]openside("Comments via Facebook");

$curlink = 'http://';
$curlink .= $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
$curlink = urlencode($curlink);

echo "<table cellpadding='0' cellspacing='0' width='auto' class='center tbl-border'>\n<tr>\n";
echo "<td class='tbl2' colspan='2'><strong>Comments Box</strong></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl1'>\n";
echo "<div id='fb-root'></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: 'XXXXX', status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>\n";
echo "<fb:comments xid='XXXXX' href='".$curlink."' numposts='5' width='auto' publish_feed='false' migrated='1'></fb:comments>\n";
echo "</td></tr>\n</table>\n";
closeside();[/syntaxhighlighter]

You can also Set the width according to your needs...

There is something really wrong about this code.
When I put in my page and reload my page I get into my facebook site in stead geting the commentbox on my site.

I totaly hate this **** right now cause of endless problems.
Ok, got it working but now it take the panels on the right site and move it under the whole damn thing.

http://linuxvefurinn.is/news.php?readmore=11

Scroll down to see how it is.

Quote

Jack Daniels wrote:
Ok, got it working but now it take the panels on the right site and move it under the whole damn thing.


Try changing openside to opentable and closeside to closetable and see if it work !
If I use this code

Quote

openside("Comments via Facebook"<img src="../images/smiley/wink.gif" alt="Wink" style="vertical-align:middle;">;

I get error. If I use only opentable; I get error and if I don't use this code but the rest it works like its on the site right now.
Change closesite to closetable and that don't change a bit.
Got it works perfectly and post the code here.
CodeDownload  

// Code Added for Facebook Comments Box
opentable("Comments via Facebook");
$curlink = 'http://';
$curlink .= $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
$curlink = urlencode($curlink);
 
echo "<table cellpadding='0' cellspacing='0' width='auto' class='center tbl-border'>\n<tr>\n";
                echo "<td class='tbl2' colspan='2'><strong>Umsagnir</strong></td>\n";
                echo "</tr>\n<tr>\n";
                echo "<td class='tbl1'>\n";
                echo "<div id='fb-root'></div>
                                <script>
                                window.fbAsyncInit = function() {
                                FB.init({appId: 'XXXXXXXXXXXXX', status: true, cookie: true,
                                         xfbml: true});
                                };
                                (function() {
                                var e = document.createElement('script'); e.async = true;
                                e.src = document.location.protocol +
                                '//connect.facebook.net/is_IS/all.js';
                                document.getElementById('fb-root').appendChild(e);
                                }());
                                </script>\n";
                echo "<fb:comments xid='XXXXXXXXXXXX' href='".$curlink."' numposts='5' width='auto' publish_feed='true' migrated='1'></fb:comments>\n";
                echo "</td></tr>\n</table>\n";
closetable();

// Code Ends here


Only thing you have to do is change XXXX to your xid number and is_IS to your languge for example us_US for english.
Once again thanks for your help.
Thread Information
Author
Replies
45 posts
Views
15,649 times
Last Post
Last updated on 9 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Harly, Structor, emilife93, l0nelyc0wboy, Jack Daniels, Rolf Mayer, Ankur