Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Twitter: Add Account freezes the App #38

Open
tom-mayer opened this issue Nov 10, 2014 · 0 comments
Open

Twitter: Add Account freezes the App #38

tom-mayer opened this issue Nov 10, 2014 · 0 comments

Comments

@tom-mayer
Copy link

Hi,

whenever I try to add an account on thw Xamain.Social Twitter UI, my app freezes and Android asks me whether to close or wait. Below is the minimal application based on the sample app. On the twitter side I added read and write permissions as well as checked "Allow this application to use 'Sign in with Twitter'". I filled in some arbitrary values for website/description and app name, I left callback URL blank.

Tested on Android 4.4 (Api Level 19).

    [Activity(Label = "Xamarin.Social Sample", MainLauncher = true)]
    public class MainActivity : Activity
    {
        private static readonly TwitterService Twitter = new TwitterService {
            ConsumerKey = "XXX",
            ConsumerSecret = "XXX"
            //CallbackUrl = new Uri("Callback URL from https://dev.twitter.com/apps")
        };

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.Main);

            Button twitterButton = FindViewById<Button>(Resource.Id.Twitter);
            twitterButton.Click += delegate {
                Item item = new Item {
                    Text = "I'm sharing great things using Xamarin!",
                };

                Intent intent = Twitter.GetShareUI(this, item, null);
                StartActivity(intent);
            };
        }
    }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant