示例#1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Social);

            this.display = FindViewById <TextView> (Resource.Id.display);

            WebView web = FindViewById <WebView> (Resource.Id.web);

            FindViewById <Button> (Resource.Id.createuser)
            .Click += OnClickFacebookCreate;

            FindViewById <Button> (Resource.Id.login)
            .Click += OnClickFacebookLogin;

            FindViewById <Button> (Resource.Id.info)
            .Click += OnClickFacebookInfo;

            this.actionLayout = FindViewById <LinearLayout> (Resource.Id.actionsLayout);

            FacebookAuthClient client = new FacebookAuthClient(web);

            web.SetWebViewClient(client);

            client.AccessToken.ContinueWith(OnAccessTokenReceived);
            client.Auth();
        }
示例#2
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate(bundle);
			SetContentView (Resource.Layout.Social);

			this.display = FindViewById<TextView> (Resource.Id.display);

			WebView web = FindViewById<WebView> (Resource.Id.web);

			FindViewById<Button> (Resource.Id.createuser)
				.Click += OnClickFacebookCreate;

			FindViewById<Button> (Resource.Id.login)
				.Click += OnClickFacebookLogin;

			FindViewById<Button> (Resource.Id.info)
				.Click += OnClickFacebookInfo;

			this.actionLayout = FindViewById<LinearLayout> (Resource.Id.actionsLayout);

			FacebookAuthClient client = new FacebookAuthClient (web);
			web.SetWebViewClient (client);

			client.AccessToken.ContinueWith (OnAccessTokenReceived);
			client.Auth();
		}