In order to open Facebook app with a specific Facebook friend, you can use this intent:
final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("fb://profile/%s", friendId)));
A similar solution is found for LinkedIn:
final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("linkedin://profile/%s", friendId)));
I think the next one will work for Google Plus (didn't test it, but it seems promising) :
final Intent intent =new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("https://plus.google.com/%s/posts", friendId)));
I've tried to find how to open VKontakte (VK) social network app using such intents, but couldn't find it.
Is there such an intent? If so, what is it?
The answer from developer is next:
Yes, it's done the same way:
final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("vkontakte://profile/%d", friendId)));
If you need to open a community, use the same URL but add the minus sign to the community ID.
Question answered here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With