I have created an greeting card using textview and imageview, and used one button at the bottom, now I want on clicking that button it should invoke Facebook app to share it.I am using this code,correct me plz.
public void onFacebookButtonClicked(View view){
String url = "https://www.facebook.com";
Intent facebookIntent = new Intent(Intent.ACTION_SEND);
facebookIntent.setData(Uri.parse(url));
facebookIntent.setType("text/plain");
facebookIntent.setPackage(url);
facebookIntent.putExtra(Intent.EXTRA_TEXT, url);
if (facebookIntent.resolveActivity(getPackageManager()) != null) {
startActivity(facebookIntent);
}
}