Cant get .NET site to work

Jan 13, 2010 at 7:29 PM

This is my first time trying to integrate Facebook to a .NET website.

Im currently using this code:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Facebook;
using Facebook.Web;
using Facebook.Rest;

public partial class web_Default : System.Web.UI.Page
	private const string ApplicationKey = "XXX";
	private const string SecretKey = "XXX";
	private Api _facebookAPI;
	private List<EventUser> _eventUsers;
	private ConnectSession _connectSession;

    protected void Page_Load(object sender, EventArgs e)



Wich gives me this error:

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

Compiler Error Message: CS0246: The type or namespace name 'EventUser' could not be found (are you missing a using directive or an assembly reference?)

Source Error:

Line 15: 	private const string SecretKey = "5935dac77b61a8035de480c270016094";
Line 16: 	private Api _facebookAPI;
Line 17: 	private List<EventUser> _eventUsers;
Line 18: 	private ConnectSession _connectSession;
Line 19: 

What am i missing?


I have added Facebook.dll and Facebook.Web.dll to my Bin folder.


Jan 19, 2010 at 2:29 AM

You need to create the EventUser class.  You are probable following the connect tutorial.  If you unzip the samples zip file and look at the facebook connect example, you will find the complete source code.