2016-09-21 2 views
0

페이스 북을 클릭하여 컨텐츠를 공유 할 때 액션 공유 활동을 프로그래밍하는 방법.Android에서 공유 활동을 프로그래밍하는 방법은 무엇입니까?

enter image description here

나는 컨텐츠 페이스 북을 만들하지만 난 페이스 북의 공유에 때 클릭을 표시하는 방법을 잘 모릅니다.

enter image description here

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); 
} 

답변

0

가 나는

 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")); 
도움이되기를 바랍니다
관련 문제