public ActionResult FacebookCallback(string code)
        {
            var     fb     = new FacebookClient();
            dynamic result = fb.Post("oauth/access_token", new
            {
                client_id     = _app_id,
                client_secret = _client_sec,
                redirect_uri  = RedirectUri.AbsoluteUri,
                code          = code
            });

            var accessToken = result.access_token;

            // Store the access token in the session for farther use
            Session["AccessToken"] = accessToken;

            // update the facebook client with the access token so
            // we can make requests on behalf of the user
            fb.AccessToken = accessToken;

            // Get the user's information, like email, first name, middle name etc
            dynamic me          = fb.Get("me?fields=email,first_name,middle_name,last_name,id,name,name_format,picture");
            string  email       = me.email;
            string  firstname   = me.first_name;
            string  middlename  = me.middle_name;
            string  lastname    = me.last_name;
            string  name        = me.name;
            string  name_format = me.name_format;
            string  fb_id       = me.id;
            dynamic pic         = me.picture;

            //string picture = me.picture;

            // Set the auth cookie
            //FormsAuthentication.SetAuthCookie(email, false);

            UserMaster user = new UserMaster();

            string pict = pic[0].url;

            user = UserMaster.GetUserByFacebookId(me.id, con);
            if (user == null)
            {
                user                 = new UserMaster();
                user.email           = (string.IsNullOrEmpty(email) ? me.id : email);
                user.display_name    = firstname + " " + lastname;
                user.FacebookId      = me.id;
                user.created_by_uid  = 1;
                user.hashed_password = "******";
                user.mobile_number   = "N/A";

                user.cid = 1;

                int i = UserMaster.CreateUser(user, con);
                user.uid = i;
            }

            Session["DisplayName"] = user.display_name;

            Session["uid"] = user.uid;


            return(RedirectToAction("Index", "Home"));
        }