Powered by discountASP.NET
referal ID: sdtref
Why recommend discountASP.NET?
$720 in referrals so far!

About/Contact

Steve Trefethen

Steve Trefethen is an employee of Falafel Software, which can help you develop .NET software or train you on .NET and software testing technologies. He is an Software Architect and Director of Software Training working in Capitola, CA . You can reach Steve here.

All opinions you read here are Steve's own and are not necessarily those of Falafel Software.

Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

Disclaimer

The posts on this weblog are provided AS IS with no warranties, and confer no rights. The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
If you're new here, you may want to subscribe to my RSS feed, follow me on Twitter, or subscribe via email. Thanks for visiting!

Facebook Developer Toolkit v1.3 Starter Kit updated

November 16 2007 7:01AM
UPDATED Nov. 6, 2008: A new release is available here.

I’ve updated my Facebook Starter Kit to version 1.3 of the Facebook Developer Toolkit published by Microsoft available on CodePlex. I also cleaned up the code and moved the Appkey and Secret so their read from web.config.

Btw, I’ve had a few questions in email about how to fetch a friend list which can be done as follows:

if (!IsPostBack)
{
System.Collections.ObjectModel.Collection
<User> userinfo = _fbService.GetUserInfo(_fbService.UserId); Label1.Text = "Hi, " + userinfo[0].FirstName;
Image1.ImageUrl
= userinfo[0].PictureUrl.ToString();

// Use the FacebookService Component to populate Friends System.Collections.ObjectModel.Collection<User> Friends =
_fbService.GetFriends();
for (int i = 0; i < Friends.Count; i++)
DropDownList1.Items.Add(Friends[i].FirstName.ToString());
}

If you haven’t seen it I’ve also created a starter kit for Nikil Kothari's Facebook.NET framework so be sure to take a look a that as well.

Enjoy!

FacebookDel.icio.usDigg It!

Tags: , .NET | Facebook | Programming

Comments

11/26/2007 1:48:35 PM #

Hi

I would just like to know if you have a sample of inviting friends to your application

thanks

Eddie

Eddie |

11/28/2007 8:39:44 PM #

Steve, thanks very much for updating the developer toolkit.  I'm trying to get this to work using Vista, IIS 7 and VS2008 and encountering an error.  Trying to view any page on the site created by the Starter Kit gives HTTP Error 500.19 - Internal Server Error.

Config Error: Cannot add duplicate collection entry

Failing on line 75:

   75:       <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

Do you have any thoughts on what might be causing this and how I can get up and running?

Rob Burke |

11/28/2007 11:21:04 PM #

I've resolved the issue I mention above by changing the target framework of my site from 2.0 to 3.5.  

However, AddApp.aspx and RemoveApp.aspx balk with:

Cannot find ContentPlaceHolder 'HeaderContentPlaceHolder' in the master page '/AppTestRB/Site.master', verify content control's ContentPlaceHolderID attribute in the content page.

... is it possible that your Master Page is missing a few ContentPlaceHolder controls?

Rob Burke |

11/28/2007 11:24:46 PM #

Hi Rob,
  Thanks very much for the feedback. I'll double check to make sure these aux pages are correct and if not post an update for the Starter Kit.

Steve Trefethen |

12/29/2007 3:33:00 AM #

Same problem as Rob Burke. The Site.Master in this Toolkit is not setup correctly, it has <asp:contentplaceholder id="MainContentPlaceHolder" runat="server"></asp:contentplaceholder> replace this with:

<asp:Content ID="Content1" ContentPlaceHolderID="HeaderContentPlaceHolder" Runat="Server"></asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="NavBarContentPlaceHolder" Runat="Server"></asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightColumnContentPlaceHolder" Runat="Server"></asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="CenterColumnContentPlaceHolder" Runat="Server"></asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="FooterContentPlaceHolder" Runat="Server"></asp:Content>

I've done and now I can publish to my local IIS and run the application from Visual Studi and it correctly links back to my local aspx files, I cannot add the application on facebook. If I run through the add app use case it fails when trying to run Appadd.aspx with a 404 error. Not sure where I'm going wrong.

Regards,
Klaus

Klaus |

12/29/2007 7:41:01 AM #

Hi Klaus,
  Thanks for the follow-up, I needed the reminder. I just now updated the starter kit and fixed the content place holder references. I'll test the addapp.aspx page to make sure that's working correctly.

Steve Trefethen |

12/29/2007 7:59:49 AM #

Rob & Klaus,
  I see that I made a mistake on the wiki page and didn't include "MyApp" in the Add/Remove page URL's. I've since corrected that error in the Welcome.htm as well as on the wiki. Apologies.

Steve Trefethen |

1/4/2010 5:15:01 AM #

Hi! Steve, firstly, thanks for all your efforts. I've just now encountered this Facebook.NET and I'm excited to do some apps on my own.

I was able to download the Facebook Starter Kit, unfortunately, I can't get it to install/work? Is it maybe that I have VS 2005 and not VS 2008. If this is the case, would you be kind enough to have a version ready for VS 2005. Thanks in advance.

JR Don Republic of the Philippines |

1/4/2010 8:59:15 PM #

Hi JR,
  I no longer use VS.NET 2005 and won't be going backwards to update this starter kit. Sorry about that.

Steve Trefethen United States |

Comments are closed