Design + Coding > Facebook Comments

Is it possible to add Facebook Comments to a non-journal website.

Here is the facebook blog that describes the steps: http://developers.facebook.com/news.php?blog=1&story=198

I have added this to my old (non SquareSpace) site without issue, but there are a couple things I'm not sure how to do here on SquareSpace. Steps 2 and 3 to be specific. Step 2 want's me to put a file in the root of my website and Step 3 wants me to add an xmlns attribute to the <HTML> tag.

Any insights would be greatly appreciated.

-Jeff Weber
Farseer Games

05.10.2009 | Registered CommenterJeff Weber

Hi Jeff- I could be wrong but I believe that at present - no one can access root anything directly- but only their own allocated "storage" directory. Maybe put in a ticket explaining what is needed for step 2 and 3 and the SQ team might be able to direct you?

05.10.2009 | Unregistered Commentersib

I wonder if I can add the xmlns attribute using JavaScript.

I found this on the web, could probably do something similar:

var newtip = document.createAttribute('ext:qtip');
newtip.value = "It's not empty anymore";
document.getElementById('mydifv).attributes.setNamedItem(newtip);

I'm at work so I can't try this yet. Will attempt when I get home. Anyone know if this would work for what I'm trying to do?

05.11.2009 | Registered CommenterJeff Weber

Try this:

<script type="text/javascript">
document.getElementsByTagName("HTML")[0].setAttribute("xmlns:fb", "http://www.facebook.com/2008/fbml");
</script>

You need to place this before the javascript that loads the facebook stuff.

Since you define where the cross domain document is located you don't have to load into root. Just supply the path info for wherever you place the cross domain file.

05.11.2009 | Registered CommenterDavin Chew

Yep, that worked.

Here is the finished result (see comments below game):

http://www.farseergames.com/divergame

The final code is below:
note 1: You need to upload the 'xd_receiver.htm' file to your SS storage.
note 2: If you use a custom css file for the comments you will need to upload that to storage as well.


<!--BEGIN FACEBOOK COMMENTS-->
<div style="width: 500px; margin: auto; padding-top: 30px;">
<script type="text/javascript">
document.getElementsByTagName("HTML")[0].setAttribute("xmlns:fb", "http://www.facebook.com/2008/fbml");
</script>

<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php"
type="text/javascript"></script>

Have a comment about this game? Leave it below.
<!–- google_ad_section_start(weight=ignore) -–>
<fb:comments
title="Diver Game At Farseer Games"
xid="diverComments"
css="http://www.farseergames.com/storage/games/diver/comments.css">
</fb:comments>
<!–- google_ad_section_end -–>

<script type="text/javascript">
FB.init("702f611cfcb300cb730872eaaae069b4", "/storage/xd_receiver.htm");
</script>
</div>
<!--END FACEBOOK COMMENTS-->


My custom css file for just the facebook comments looks like this:

.wallkit_frame
{
background-color: #000033;
}
.wallkit_post
{
color: white;
}
.wallkit_form
{
color: #000033;
}

05.11.2009 | Registered CommenterJeff Weber

Hello, Jeff.
I'm just getting started with customizing my Squarespace site, and would really like to setup Facebook Connect. Before I start working on it (I know nothing about coding so it's gonna take me a while), can you tell me a little more about it? Specifically, did the Facebook Connect comment block replace the Squarespace comment block? Can you still moderate comments and/or delete them at will? Any other thoughts you have would be appreciated!

07.22.2009 | Unregistered CommenterAnastasia

Hey,
I was wondering if anyone actually accomplished this. I have done everything right and followed all the directions, but for some reason I am unable to replicate this work. I want to be able to post facebook comments on my squarespace after posts... Please help me someone! I talked to squarespace and they are unwilling to help me in the slightest. It is kind of irritating seeing this work on wordpress blogs and I, who pays, am limited without any desire to help from the customer service I pay for.

11.2.2009 | Unregistered CommenterMike Lopapa

Hi Mike,

Squarespace support staff can help you with questions about how to use standard Squarespace features and functions, and I have always found them to be very responsive and helpful. Customization, however, is your own responsibility, and -- for a hosted service -- Squarespace is reasonably open. So we can do just about anything with custom code.

IMO, none of us pays enough to cover the cost of a technical support service that would be available to help with an arbitrary range of coding questions. In fact I doubt if you could find any product whose tech support team provides such a service, especially a product whose fees are comparable to those Squarespace charges. But I am open to hearing different points of view about that. That's why we have this forum.

So:
-- If you post a link to your site in this thread, and point to the code that is not working, maybe someone will take a look at it and help you to fix your code.
-- If you want to discuss the quality of the Squarespace Tech Support, and make a case for them providing more customization assistance, you can start another thread about that in the "Features and System" area of this forum.

--Chris

11.3.2009 | Registered CommenterChris Loosley

Hey,

I reckon that I've replicated the steps as above, but I am having problems getting anything to happen. It's likely to be completely my fault as implementing code is not my strong point at the moment...(starting to get the hang of it though!).

Would anyone mind checking my coding to see if it's correct please? I'd really appreciate some help if anyone has a spare moment.

http://garidavies.me.uk is the site that I am trying to add this to.

<!--BEGIN FACEBOOK COMMENTS-->
<div style="width: 500px; margin: auto; padding-top: 30px;"> <fb:comments></fb:comments> </div>
<!--END FACEBOOK COMMENTS--

12.8.2009 | Registered CommenterGari

Please ignore the above post... I cannot revise the post as the code that was pasted made the submit comment box disappear, and I can't see how to get the code to post without screwing the forum post up :-(

12.8.2009 | Registered CommenterGari