Exemplo n.º 1
0
        private async static void InstantiateFBClient()
        {
            FBClient client = new FBClient();

            string email    = "*****@*****.**";
            string password = "******";

            // Login with username and password
            var logged_in = await client.DoLogin(email, password);

            // Check login was successful
            if (logged_in)
            {
                List <FB_Thread> threads = await client.fetchThreadList();

                List <FB_Message> messages = await client.FetchThreadMessages(threads.First().uid);


                //Send a message to myself
                var msg_uid = await client.SendMessage("Hi me!", thread_id : client.GetUserUid());

                if (msg_uid != null)
                {
                    Console.WriteLine("Message sent: {0}", msg_uid);
                }

                // Do logout
                await client.DoLogout();
            }
            else
            {
                Console.WriteLine("Error logging in");
            }
        }
Exemplo n.º 2
0
 private async static void LogOut()
 {
     await client.DoLogout();
 }