Project team
Project team

Reputation: 1

code for logging into facebook

We want the code for logging into facebook through a desktop application. specifically looking for code in C#.net.

Upvotes: 0

Views: 117

Answers (2)

Try this.. ñ_ñ

private const String API_KEY="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
    private FacebookService servicio = new FacebookService();


try
        {
            servicio.ApplicationKey = API_KEY;
            servicio.ConnectToFacebook(new List<Enums.ExtendedPermissions>() { Enums.ExtendedPermissions.read_stream, Enums.ExtendedPermissions.publish_stream });
            label1.Text = servicio.Users.GetInfo().first_name + " " + servicio.Users.GetInfo().last_name;
            pictureBox1.Image = servicio.Users.GetInfo().picture_small;
        }catch (FacebookException fe)
        {

            listBox1.Items.Add(fe.Message);
        }

this code must be in a button.. or another control you want... Grettings..

Upvotes: 0

JCasso
JCasso

Reputation: 5523

You need to use Facebook API

See here: http://wiki.developers.facebook.com/index.php/User:C_Sharp

Upvotes: 1

Related Questions