I'm trying to implement Facebook Like button which is not part of Android Facebook SDK using WebView. The idea is very simple. I use SDK to log into user account using SSO so user don't need to type login/password again if user is already logged in android FB app. Then I want to use WebView to insert standard Like Button.
I already have user auth token, permission for sending status on the wall etc. The problem is how to tell WebView that user is already sign-in. I was trying to use WebView (with enabled JS) with this URL (webview.loadURL()) generated by FB:
http://www.facebook.com/plugins/like.php?href=myurl&send=false&layout=button_count&width=450&show_faces=true&action=like&colorscheme=light&font&height=21&appId=myId"
+ "&token=" + mFacebook.getAccessToken()+"&expires="+mFacebook.getAccessExpires(); //(or auth_token instead)<br>
Obviously this is wrong/or is not enought to send autorization in this way because after click on Like button user is redirected to login page in web browser.
So the question is how to edit this URL or how to set cookies (what to set to URL in CookieManager and which cookies) in WebView to sign user in.
Thanks for any help!