Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Facebook login init

$
0
0

Hi everybody!
How can I initiate a Facebook login process when I handle my own button? I use Xamarin.Facebook.iOS nuget pack (v. 4.5.1).

For instance, I have a ButtonRenderer class, where I handle users touchUp the button, and somewhere here I need to put some Facebook code, which opens FB login page in web-browser and so on:

    public class LoginButtonRenderer : ButtonRenderer
        {
            protected override void OnElementChanged(ElementChangedEventArgs<Button> e)
            {
                UIButton me;
                base.OnElementChanged(e);

                if (Control != null)
                {
                    me = Control;
                    me.TouchUpInside += OnTouchUpInside;
                }
            }

        private void OnTouchUpInside(object sender, EventArgs e)
        {
            // what should I write here?
        }
    }

Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>