missing assembily

Oct 31, 2010 at 8:00 AM

getting error when trying to load test file

Error 1 The type or namespace name 'Components' does not exist in the namespace 'Facebook' (are you missing an assembly reference?)

Here is my code.  straight out of the box?  I can't figure it out.

I have references to Facebook.dll and Facebook.Web.dll What gives?

When I type Facebook. in code the intelesence pulls up

Facebook.BindingHelper;

Facebook.Rest;

Facebook.Schema;

Facebook.Session;

Facebook.Utility;

Facebook.Web;

but no Components....

Thanks for your help

using

System;

using

System.Data;

using

System.Configuration;

using

System.Collections;

using

System.Web;

using

System.Web.Security;

using

System.Web.UI;

using

System.Web.UI.WebControls;

using

System.Web.UI.WebControls.WebParts;

using

System.Web.UI.HtmlControls;

using

Facebook;

using

Facebook.Web;

public

partial class _Default : System.Web.UI.

Page

{

new Facebook.Components.FacebookService();

Facebook.Components.FacebookService _fbService =

 

 

private const string FACEBOOK_APPKEY = ""; // From the Facebook application page

 

private const string FACEBOOK_SECRET = ""; // From the Facebook application page

 

string userId;

 

protected void Page_Load(object sender, EventArgs e)

{

_fbService.ApplicationKey = FACEBOOK_APPKEY;

_fbService.Secret = FACEBOOK_SECRET;

_fbService.IsDesktopApplication =

false;

 

string sessionKey = Session["facebook_session_key"] as String;

userId = Session[

"facebook_userId"] as String;

 

// When the user uses the facebook login page,

 

// the redirect back here will have the auth_token in the query params

 

string authToken = Request.QueryString["auth_token"];

 

if (!String.IsNullOrEmpty(sessionKey))

{

_fbService.SessionKey = sessionKey;

_fbService.UserId = userId;

}

 

else if (!String.IsNullOrEmpty(authToken))

{

_fbService.CreateSession(authToken);

Session[

"facebook_session_key"] = _fbService.SessionKey;

Session[

"facebook_userId"] = _fbService.UserId;

Session[

"facebook_session_expires"] = _fbService.SessionExpires;

}

 

else

{

Response.Redirect(

@"http://www.facebook.com/login.php?api_key=" +

_fbService.ApplicationKey +

@"&v=1.0");

}

 

if (!IsPostBack)

{

System.Collections.ObjectModel.

Collection<User> userinfo = _fbService.GetUserInfo(_fbService.UserId);

Label1.Text = userinfo[0].FirstName +

"'s favorite shops";

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++)

DropDownList2.Items.Add(Friends[i].FirstName.ToString());

}

}

}