Powered by discountASP.NET
referal ID: sdtref
Why recommend discountASP.NET?

Archives
Steve Trefethen Steve's RSS Feed Subscribe or via email
What's this?
Contact me Send mail to the author(s)
About Me
View my LinkedIn profile

Add to Google
Subscribe with Bloglines
MCP Microsoft Certified Professional

Falafel Software
ActiveFocus Project Management Solution by Falafel Software
Online or OnSite TestComplete Training
Blogroll
Recent Comments
My Online Tools
Stats
Total Posts: 441
This Year: 46
This Month: 2
This Week: 0
Comments: 1531
Tags
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.
My most popular blog posts (Q1 2008)
 Tuesday, September 18, 2007
« I wish the Delphi command line compiler ... | Main | Facebook.NET Starter Kit update »

VS.NET starter kit for Nikhil Kothari's Facebook.NET

Posted @ 9:06PM by Steve Trefethen

Categories: Facebook

Tags:

Back in July Nikhil Kothari released Facebook.NET which is an ASP.NET wrapping of the Facebook API. Facebook.NET is a bit different approach than Facebook Developer’s Toolkit and provides some ASP.NET controls that wrap some of the more useful elements of the FB API. Nikhil and I exchanged a few emails back in July and he asked if I’d put this together but I’d just started a new job and was in the midst of remodeling my house and now things have settled down I decided to get it out

Use of this starter kit is very close to the previous one I released. The kit includes a Welcome.htm which is displayed in VS.NET when you create a new application that has all of the details of getting the two flavors of FB application (IFrame and FBML) up and running. One note, I tweaked the FB API version in FBML\Default.aspx since "0.3" is no longer supported.

Let me know if you have any problems. Download

[UPDATED: Jan 14, 2008] I updated the Starter Kit to v0.3 of Facebook.NET. Additionally, the starter kit has been updated to VS.NET 2008

[UPDATED: May, 6, 2008] Here are some additional links:
Monday, September 24, 2007 3:19:06 PM (Pacific Standard Time, UTC-08:00)
Hey,

Ive just downloaded your facebook starter kit and managed to get it up and running, but when I go to fill out the optional fields, the only section I get is Base Options and none of the others?

It may be because Facebook hasnt installed the developer app properly (it doesnt show up in my apps and I have to add every time from the devlopers link at the bottom of the screen...)

Any ideas whats going on?
Karl
Monday, September 24, 2007 8:33:42 PM (Pacific Standard Time, UTC-08:00)
Hi Karl,
Looks like I forgot one step (which I've added to Welcome.htm and updated the Starter Kit) which is, under Base Options to set "Can this application be added to Facebook?" to "Yes". That will cause the additional options to appear. It's very obscure, I agree.
Tuesday, September 25, 2007 2:26:44 AM (Pacific Standard Time, UTC-08:00)
hi

i downloaded the starter kit above.

Then i opened Visual Studios and clicked on File - New - Website - and then selected the Facebook.NET template.

Then i clicked on the play button to debug the application. All it did was load the login page to facebook displaying a message saying "Invalid API..."

What should I do?

Thanks
carlito
Tuesday, September 25, 2007 2:48:25 AM (Pacific Standard Time, UTC-08:00)
i am now looking at the welcome.htm page.

Under point number 4 it says:

Under Base Options Callback URL -> http://localhost:nnnn/MyApp/default.aspx

Should I use the localhost address that you guys have provided or should I use my own???
carlito
Tuesday, September 25, 2007 3:38:33 AM (Pacific Standard Time, UTC-08:00)
I tried using my own localhost but no luck:

http://localhost:53464/Facebook.NET1/default.aspx

What should I do?

Thanks
carlito
Tuesday, September 25, 2007 4:14:21 AM (Pacific Standard Time, UTC-08:00)
i'm trying to download the file but it is not working it gives me the following message "can not load file or assembly MicroSoft.WizardFrameWork .............."
File Corrupted
Tuesday, September 25, 2007 7:54:41 AM (Pacific Standard Time, UTC-08:00)
Carlito,
You need to be sure to follow all of the detailed instructions in Welcome.htm. I've had lots of people use the Starter Kit successfully so I know all the details are there.

Your local URL will be specific to your application. In the example you'll need to supply "nnnn" which is the port number and "MyApp" which is your applications virtual directory.
Tuesday, September 25, 2007 7:58:06 AM (Pacific Standard Time, UTC-08:00)
"File Corrupted",
I'd take a look at this page: http://www.codeplex.com/DocProject/Thread/View.aspx?ThreadId=9037

Perhaps it will give you some insight on how to correct the problem. Sounds like your configuration may be a bit messed up.
Monday, October 01, 2007 12:56:59 AM (Pacific Standard Time, UTC-08:00)
hi steve

thanks for your replies.

i think i have made some progress but i have encoutered another problems that is stalling me in my quest to conquer this facebook stuff.

I have completed all the steps on the welcome.html page including the "Configuring your application" section. But no luck. What is the application that you have created suppose to do?

What I keep getting when I go to http://apps.facebook.com/Facebook.NET1/
is "The page you requested was not found."

What do you suggest I do now?

Thanks for your help so far.

Look forward to your response.
carlito
Thursday, October 04, 2007 2:10:00 PM (Pacific Standard Time, UTC-08:00)
I get the same error as well:

When I go to http://apps.facebook.com/Facebook.NET1/
is "The page you requested was not found."


Rosie
Thursday, October 04, 2007 3:16:19 PM (Pacific Standard Time, UTC-08:00)
Does it require .net 2.0?

I'm getting this error:

Parser Error Message: The format of the file 'FacebookNET.Web' is invalid.
Friday, October 05, 2007 2:33:59 PM (Pacific Standard Time, UTC-08:00)
Hello,

Installation of VSI seemed to be successful (devenv closed), but then I couldn't find it (not in create project, not in create web site).

I also tried "devenv /setup" and "devenv /InstallVSTemplates", but didn't help.

Any suggestion?

Thanks
MikeG
Friday, October 05, 2007 2:39:33 PM (Pacific Standard Time, UTC-08:00)
sorry for double post.

i think i figured out why it didn't work: ZIP files reports CRC errors when I tried to manually unzip it.

I am running this on Win 2003 Srv, thought I doubt this is the issue
MikeG
Friday, October 05, 2007 10:22:16 PM (Pacific Standard Time, UTC-08:00)
I see there was a mistake in Welcome.htm in step 4 where the callback should read:

http://localhost:nnnn/MyApp/default.aspx

The "default.aspx" was missing and it's necessary.

My bad, sorry about that.

MikeG,
I've downloaded the .vsi file on my site and installed it locally and it works just fine so I'm not exactly sure what you're running into.
Friday, October 05, 2007 10:23:22 PM (Pacific Standard Time, UTC-08:00)
Chris,
I've not tried Facebook.NET using .NET 1.1 only 2.0.
Tuesday, October 09, 2007 8:31:27 PM (Pacific Standard Time, UTC-08:00)
Boy am I lost... How do I work with Facebook.net under the webdeveloper studio? I down lost the vsi but its only for c#, is there one for vb? What reading do you recommend for complete noobies.
Aldo
Wednesday, October 10, 2007 1:51:08 AM (Pacific Standard Time, UTC-08:00)
Yup, I can't install it either, as it's only for C#??
Shem
Wednesday, October 10, 2007 9:10:37 AM (Pacific Standard Time, UTC-08:00)
Aldo,
Facebook.NET is just an assembly like any other, it does have a few controls that can be added to your toolbox but that's neither here or there really. The starter kit is intended to help you get a project up and running quickly so just create a new website and look at the project files.

I'm not familiar with VB so, no there is no VB version though since there is hardly any code converting this version to VB should be a piece of cake. I supposed I could create a VB version but that's not high on my list right now.

To successfully write Facebook applications you should familiarize yourself with the Facebook API and not just Facebook.NET.

Shem,
Why can't you install it? As I mentioned above there is hardly any code in the app so converting it to VB should be a no-brainer.
Wednesday, October 10, 2007 10:59:58 AM (Pacific Standard Time, UTC-08:00)
Steve,

I added the callback URL to my app in facebook as:

http://localhost:nnnn/MyApp/default.aspx


and I am using the Hello, World! example from Facebook.NET (using iframes). The app's initial canvas page works, however when I click on the link to "Browse Photos" which is defined in my default.aspx page as:

<fb:FacebookHyperLink runat="server" id="photosLink" NavigateUrl="Photos.aspx" Text="Browse Photos" />

... I receive an HTTP 404 - not found error, and the debug info shows the following requested url:

Requested URL: /TestApp/default.aspxPhotos.aspx


Why is facebook treating default.aspx as root? (I tried taking default.aspx out of the callback URL string, this doesn't work either)

Thanks for your help

Alex L
Wednesday, October 10, 2007 11:51:50 AM (Pacific Standard Time, UTC-08:00)
Found the solution:

the callback URL should be:

http://localhost:nnnn/MyApp/

without default.aspx. However it should contain the slash at the end.
Alex L
Thursday, October 11, 2007 6:35:44 AM (Pacific Standard Time, UTC-08:00)
Thanks Alex,
I've been going back and forth on that and I'll fix the kit.
Tuesday, October 16, 2007 6:57:35 AM (Pacific Standard Time, UTC-08:00)
Great work Steve. It seems like a small thing, but this kit will be a huge jumpstart for a lot of developers. Your work is much appreciated.

I've got to concur with the suggestion about the callback URL. The best strategy is sans page name.
Tuesday, October 16, 2007 12:55:51 PM (Pacific Standard Time, UTC-08:00)
Hi drasticp,
Thanks! I'm glad you've found it useful. I just uploaded a new version which fixes the Callback URL documentation and tweaked the Starter Kit so that it opens Welcome.htm upon the creation of a new Facebook.NET web site.
Tuesday, October 16, 2007 8:01:58 PM (Pacific Standard Time, UTC-08:00)
For all people having page not found probs ... read this

http://blog.jeromeparadis.com/archive/2007/09/10/Facebook-Developer-how-to-solve-the-quotPage-requested-not-foundquot.aspx
Wednesday, October 17, 2007 11:39:30 PM (Pacific Standard Time, UTC-08:00)
Hi,
Thank you for your article.
My question is about Facebook Toolkit of Microsoft.
Do you have any idea about, how to display multi-friend selector for inviting people in IFrame based applications?
I did it in FBML application, but because postbacks, scripts etc are not allowed in FBML, it does not fulfill with my needs.

Can you please help?
Thanks
Ilhan Ercan
Thursday, October 18, 2007 8:25:09 AM (Pacific Standard Time, UTC-08:00)
Hi Ilhan,
Since you can't use FBML in an IFrame you'll need to write your own multi-friend selector.
Sunday, October 21, 2007 11:46:45 AM (Pacific Standard Time, UTC-08:00)
Ilhan,
Facebook does offer an IFrame version of their FBML multi-friend selector. You can find the details at http://wiki.developers.facebook.com/index.php/Multi_friend_selector .

I am working on a control for rendering this version of multi-friend selector now but don't have anything ready to share yet.

Hope this helps,
-dk
dk
Monday, November 05, 2007 11:13:48 AM (Pacific Standard Time, UTC-08:00)
Steve,

Are you updating your VS tool with the pathces and updates at nikhil FacebookNET library?

I am new in this, if i downlaod nikhi's new source-relese and compile the dll, how can i add that to your tool without causing any trouble.

Taanks a bunch!
Tuesday, November 06, 2007 2:45:41 PM (Pacific Standard Time, UTC-08:00)
Hi alam,
The starter kit is up-to-date with the binary 0.2.1.0 release of Facebook.NET which is the latest release from codeplex. If the assemblies are updated all you should have to do is download them and overwrite the existing versions.
Wednesday, November 14, 2007 6:14:39 PM (Pacific Standard Time, UTC-08:00)
Do you have any basic code for default.aspx.cs that would demonstrate how to get the usersid, list of users friends, etc?

I'm trying something simple like this in _load:
Facebook.Web.FacebookApplication fb = new Facebook.Web.FacebookApplication();
this.lblUser.Text = fb.Session.UserID;

Really interested in this, and a bit hesitant to try the Microsoft.NET toolkit.
Dustin
Wednesday, March 19, 2008 4:53:38 AM (Pacific Standard Time, UTC-08:00)
Hi Steve
Good work done.
I have a doubt in this. I have created my own application in Facebook and when i open the application it works fine.
1. But when i submit my application to the Directory the following message appears
"Your application must have at least 5 users before you can submit it to the Application Directory. We cannot showcase any applications that are under construction or do not utilize the Facebook Platform."
How to solve this problem. How can i invite users(my friends)
2. When my facebook friend opens my application ("http://apps.facebook.com/foretee/"), she gets an error as

"The page you requested was not found.
You may have clicked an expired link or mistyped the web address (some urls are case sensitive).
Return home
Go back to the previous page"


Please help me out in solving this problem.

Thanks in advance...
Wednesday, March 19, 2008 7:05:17 AM (Pacific Standard Time, UTC-08:00)
Gayathri,
I had no problem getting my application added to Facebook. I think you need to check the settings on your application. For more help, I'd suggest posting to the Facebook developers forums.
Monday, March 31, 2008 5:29:46 AM (Pacific Standard Time, UTC-08:00)
Hi,

I will try to devlope a facebook application in asp.net with C#.This is in ifarame.But when i will tring to implement it hall page of facebook is show in canvas.
soni umesh
Sunday, April 27, 2008 5:30:47 AM (Pacific Standard Time, UTC-08:00)
hi Steve,

I just downloaded .vsi and am going through the welcome.htm, I noticed that you repeat yourself in the welcom.htm the same information in step 6 as in step 5 'Under Installation options', please let me know if I'm missing something.

Thanks,
Sunday, April 27, 2008 4:35:14 PM (Pacific Standard Time, UTC-08:00)
Hi Zubair.NET!
Thanks for the comment. I'll make sure to fix this the next time I update the Starter Kit.
Tuesday, April 29, 2008 3:55:28 PM (Pacific Standard Time, UTC-08:00)
Hi Steve,
Actually I want only to thank you about your greate effort specially your answers to help others. I really learn alot from you.
I am also like your smile too ;D

Thank you,
Mohammed Elkhodary
EGYPT
Mohammed Elkhodary
Wednesday, April 30, 2008 3:31:32 AM (Pacific Standard Time, UTC-08:00)
hi again Steve,

I have a question that I hope you can answer. I'm developing using Facebook.NET, I use Profile.setFBML to show the content on my profile but it doesn't appear when my friends view my profile, any ideas ?
Thursday, May 01, 2008 9:21:41 PM (Pacific Standard Time, UTC-08:00)
Hi Mohammed,
Thanks very much for the comment and kind words, most appreciated.
Tuesday, May 06, 2008 12:06:51 PM (Pacific Standard Time, UTC-08:00)
I just downloaded vsi but when I am trying to run it I get this error:
“One or more content items contained within the .vscontent file cannot be installed because the correct version of the content installer component cannot be found.
Contact the author of the content file for information about which installers and versions are required.”
Any help would be appreciated.
Sergey
Tuesday, May 06, 2008 12:49:08 PM (Pacific Standard Time, UTC-08:00)
Hi Sergey,
If you check the last note at the bottom of this post you can see that I updated the Starter Kit to VS.NET 2008. If you're using 2005 you'll see this error. You can still get at the files by renaming the .vsi file to .zip and extracting the contents. If I get a chance I'll look at posting a VS.NET 2005 version but I can't say I'll get to that soon.
Wednesday, May 07, 2008 2:45:56 AM (Pacific Standard Time, UTC-08:00)
hi Steve,

sorry for re-posting this, any ideas why my friends cannot see my application box on my profile ?
Wednesday, May 07, 2008 8:30:40 AM (Pacific Standard Time, UTC-08:00)
Zubair.NET,
I'd suggest posting to the FB developer forums.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strong) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Live Comment Preview