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?
}
}