如何对单击facebook共享内容时的操作共享活动进行编程。

我创建了facebook内容,但我不知道如何指示何时单击facebook共享。

Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.setType("text/plain");
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "Compartir");
sendIntent.putExtra(Intent.EXTRA_TEXT, "Descargar");
startActivity(sendIntent);
private void shareFacebook(){
shareDialog = new ShareDialog(this);
ShareLinkContent linkContent = new ShareLinkContent.Builder()
.setContentTitle("Hello Facebook")
.setContentDescription(
"The 'Hello Facebook' sample showcases simple Facebook integration")
.setContentUrl(Uri.parse("http://developers.facebook.com/android"))
.setImageUrl(...)
.build();
shareDialog.show(linkContent);
}发布于 2016-09-22 02:54:24
我希望它能帮上忙
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, "http://developers.facebook.com/android");
startActivity(Intent.createChooser(intent, "share"));https://stackoverflow.com/questions/39624303
复制相似问题