title: Send Text and App name to Facebook
body: <p>Its share image and text in email and twitter but in facebook text is not displaying. <code>Is it possible to share text to facebook using intent?.</code> </p>
  
  <p>Please help for this.</p>
  
  <pre><code>private void share(String nameApp, String imagePath) 
  {
      try
      {
          List&lt;Intent&gt; targetedShareIntents = new ArrayList&lt;Intent&gt;();
          Intent share = new Intent(android.content.Intent.ACTION_SEND);
          share.setType("image/jpeg");
          List&lt;ResolveInfo&gt; resInfo = getPackageManager().queryIntentActivities(share, 0);
          if (!resInfo.isEmpty()){
              for (ResolveInfo info : resInfo) {
                  Intent targetedShare = new Intent(android.content.Intent.ACTION_SEND);
                  targetedShare.setType("image/jpeg"); // put here your mime type
                  if (info.activityInfo.packageName.toLowerCase().contains(nameApp) || info.activityInfo.name.toLowerCase().contains(nameApp)) {
                      targetedShare.putExtra(Intent.EXTRA_SUBJECT, "Virtual Mirror Photo");
                      targetedShare.putExtra(Intent.EXTRA_TEXT,"This photo is created by Virtual Mirror App.\n\nInfoshore Team");
                      targetedShare.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File(imagePath)) );
                      targetedShare.setPackage(info.activityInfo.packageName);
                      targetedShareIntents.add(targetedShare);
                  }
              }
              Intent chooserIntent = Intent.createChooser(targetedShareIntents.remove(0), "Select app to share");
              chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, targetedShareIntents.toArray(new Parcelable[]{}));
              startActivity(chooserIntent);
          }
      }
      catch(Exception e){
      }
  }
  </code></pre>