Facebook fan box in widget

Topics: ASP.NET 2.0, Controls
Jul 31, 2009 at 5:25 PM

Hello,

Not sure if it's me going mad, but has anyone managed to put a facebook fan box code into a widget?

I've tested the code on the master page and it appears ok, but when I put it into the ascx of a widget nothing appears.

I generated the fan box code from: http://www.facebook.com/developers/wizard.php

and got the instructions from: http://wiki.developers.facebook.com/index.php/Fan_Box#Adding_a_Fan_Box_to_Your_Site

Would love to know if others are having the same issues.

Thanks

 

Jan 25, 2010 at 1:10 PM

Hi there!

Did you ever find a solution to your issue?

I've tried creating a "Fan Box" in a widget on a development version of our blog (I actually just made a text box widget, edited the html via the blogengine interface and copy/pasted in the code snippet from the facebook developer wizard you linked to above).

The JS seems to "choke".

After looking around at the javascript on the page a bit, I found this:

 1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" >
4<head>
5 <title>Login Status</title>
6</head>
7 <body>
8 <script type="text/javascript">
9 document.domain = "facebook.com";
10 </script><div id="error" class="UIMessageBox error"><h2 class="main_message" id="standard_error">Invalid Argument</h2><p class="sub_message" id="standard_explanation">The Facebook Connect cross-domain receiver URL (http://qablog/default.aspx?fbc_channel=1) must have the application's Connect URL (http://www.facebook.com/) as a prefix. You can configure the Connect URL in the <a href="http://www.facebook.com/developers/editapp.php?app_id=132703160609">Application Settings Editor</a>.</p></div></body></html>


I thought that perhaps the issue was being caused by the fact that I was trying to use facebook connect on an internal domain. But I tried uploading a file "test.html" that contained the facebook fan box code and nothing else, and it worked no matter which domain I put it on.

Has anybody else run into this issue since, or figured out what's going on?

Thank you!

 

Jan 25, 2010 at 1:54 PM

I managed to get it working by putting the facebook code on the master page instead.

I think it may have been to do with the ascx Id's being dynamic on page render, though I could be wrong. 

Hopefully someone can find a proper solution to this.

Jan 25, 2010 at 8:04 PM

Have you tried the Literal Widget?

Jan 18, 2011 at 5:23 PM

What is the status of this? 

Can we make a Facebook widget or is it not going to work?

Thanks!

Jan 19, 2011 at 9:22 PM

Have you tried both the iframe and FBML versions?