コード例 #1
0
        public async Task <bool> LoginToTwitter()
        {
            try
            {
#if __IOS__
                if (Device.HasIntegratedTwitter)
                {
                    return(await LoginTwitterOld());
                }
#endif
                var account = await twitter.Authenticate();

                var user = await twitter.Get <Dictionary <string, string> >("account/verify_credentials.json");

                Settings.TwitterDisplay = user["name"];
                Settings.TwitterAccount = user["id"];
                return(true);
            }
            catch (Exception x)
            {
                Console.WriteLine(x);
            }
            return(false);
        }