My First Desktop Application. Please Help

Feb 22, 2010 at 8:30 PM

 

Hello,

I am very new with c# and more than that with facebook developing.


I am trying to create a simple desktop application. and I got some errors.. I read some articles and google it, but cannot find the answar

It is something related to the sessionkey... I am not sure. 

this is the code: (it should update status via the application)

 

    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

       


        private void Form1_Load(object sender, EventArgs e)
        {
            facebookService1.IsDesktopApplication = true;
            
        }

        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.ToString());
            if (updated)
            {
                txtStatus.Text = "";
            }
        }
    }
}

thanks!!

 

 

Feb 23, 2010 at 8:40 PM

Sorry friends,

 

The code works properly.  I had some Visual studio problems and fixed it!

 

 

Aug 1, 2010 at 1:54 PM

can u you send me your whole code?