I use facebook-android-sdk-3.0.1.b to integrate my Android app with Facebook. After user has logged in (explicitly or implicitly - does not matter), the callback is called:
@Override
protected void onSessionStateChange(SessionState state, Exception exception) {
if (state.isOpened()) {
final String urlString = "http://www.facebook.com/22332332322";
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(urlString)));
}
}
As you can see, I launch a broswer passing it some facebook page. My goal is to allow user to "like" this page. However, as user presses "like" button on this page, he is asked to authorize. That's not good because he has already authorized.
I am interested is it possible to extract authorization information (access token or whatever) from facebook-android-sdk and pass this information to the browser?
Update
I have found that it is possible to obtain access token for a session:
final String accessToken = getAccessToken();
But how can I pass it to the browser to make the user logged in?