I want to retrieve token via Account Manager classes. Here is sample code that works for twitter but not for facebook plz help me.
public class AccountMana
You can also create intent and obtain token from facebook application
Intent intent = new Intent();
intent.setClassName("com.facebook.katana", "com.facebook.katana.ProxyAuth");
intent.putExtra("client_id", apiKey);
intent.putExtra("scope", scope);
try {
activity.startActivityForResult(intent, requestCode);
} catch (ActivityNotFoundException e) {
return false;
}
Then onActivityResult(int requestCode, int resultCode, Intent data)
of you activity you can get the token using
data.getStringExtra("access_token");