陳鍾逸 陳鍾逸 - 8 months ago 90
iOS Question

Login Facebook in webView with SDK [Swift]

I'm developing an app in which I have login via facebook SDK.

I think that when I logged in and webView load the https://www.facebook.com

and automatically login own facebook but it doesn't work

Still have to input Account and Password enter image description here

func loginButton(_ loginButton: FBSDKLoginButton!, didCompleteWith result: FBSDKLoginManagerLoginResult!, error: Error!) {
if error != nil
{
print(error)
return
}
else if (FBSDKAccessToken.current() != nil)
{
print("Successfully logged in with facebook...")
webView.loadRequest(URLRequest(url: URL(string:"https://www.facebook.com")!))
}
}

Answer Source

You will found all the social login demos here:

https://github.com/onearmbandit/Facebook-Twitter-Google-linkedIn-login

good luck..!