I\'m developing a social networking app and our users can connect their Instagram account to our service. I\'d like to open Instagram profiles directly in their official And
I tried this way and it worked for me..
instabtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent instaintent = getActivity().getPackageManager().getLaunchIntentForPackage("com.instagram.android");
instaintent.setComponent(new ComponentName( "com.instagram.android", "com.instagram.android.activity.UrlHandlerActivity"));
instaintent.setData( Uri.parse( "https://www.instagram.com/_u/bitter_truth_lol") );
startActivity(instaintent);
}
});