Facebook Developer Toolkit :: facebook does not exist in the current context

May 17, 2012 at 4:01 AM

I am using facebook developer toolkit. I have added reference to facebook.dll and facebook.winforms.dll. Also added Facebook.winforms.dll to toolbox. Please see the code below.

       
 private void btnLogin_Click(object sender, EventArgs e)
        {
            facebookService1.ConnectToFacebook();

try
{
facebookService1.GetExtendedPermission(facebook.Types.Enums.  Extended_Permissions.status_update);
}
catch (Exception exception)
{
MessageBox.Show(this, exception.Message, "Error");
}

        }

private void btnShare_Click(object sender, EventArgs e)
        {
            String status = txtStatus.Text;
Boolean updated = facebookService1.API.users.setStatus(status);
if (updated)
{
txtStatus.Text = "";
}
        }
    }

I am getting 3 compilation errors.

  1. The name facebook does not exist in the current context.

2.Facebook.Winforms.Components.FaceBookService does not contain a definition for GetExtendedPermission.

3.Facebook.Winforms.Components.FaceBookService does not contain a definition for API.

Why this happens?..No clue about it..Any ideas? Thanks

Mar 3, 2014 at 4:23 PM
my app also facing similar error
Error :- "The type name 'Winforms' does not exist in the type 'Test.Facebook'"..