Possible Duplicate:
launch facebook app from other app
I am doing one android project, In that project i need to get Facebook User Details like UserId,AccessToken.
Done Facebook Integration using Fcebook SDK.
Now, Facebook Released URL SCHEME to open facebook application and get user details.
I’m Done like this,
long longFacebookUid = Long.parseLong(facebookUid);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setClassName("com.facebook.katana", "com.facebook.katana.ProfileTabHostActivity");
intent.putExtra("extra_user_id", facebookUid);
this.startActivity(intent);
return;
In this code Called Facebook Application, After that i don’t no How to get userId and Token.
Thanks.
Beside URL SCHEME, using the SDK based function is more simple.But it may not be the answer you want.
Remarks: The following information is based on facebook-android SDK 2.0(3.0 is avaliable now)
After running the authorize function (Login Part)(The following is sample code in facebook document)
In order to get the access token, just run the following function in SDK 2.0
For the userID
I think these are the most simply way to get the result, but not using the URL SCHEME.
I hope it can help you.