I’m developing android app in which I have login via Facebook SDK. In app I also have facebook social comments displayed in webview. But problem is even if user is logged through fb sdk, the webview doesn’t know about it and for posting new comment it requires user to login.
So with what I figured out to this point, there is no way how to pass loged session to WebView.
Or you can load m.facebook.com directly, but this way it will take you to user’s wall after login. Above solution offers you to display another content after login as users picture and info only (with log out button of course).
Hope it helps 🙂
You can try to pass the access_token from the native sdk to the webview via query string.
myWebView.loadUrl('http://mydomain.com/?access_token=' + facebookAccessToken);
Facebook Rest API service is already deprecated.
You can user Facebook SDK to login and access details from facebook. Check the facebook documentation.
Did you try out the tutorials in developers.facebook.com/, here they clearly given how to login. Once you logged in the details of the user will be cached, if you need to publish any data you might need permission for that, so you will be directed to login activity once more. Its given in this link