2016-02-26 66 views
0

我想在Facebook上分享一些文字和圖像。代碼是: -無法在Facebook應用上共享文本和圖像在Android應用程序

public void clickShareBtn(View view){ 
     try 
     { Intent i = new Intent(Intent.ACTION_SEND); 
      i.setType("image/*"); 
      i.putExtra(Intent.EXTRA_SUBJECT, "My application name"); 
      String sAux = "\nLet me recommend you this application\n\n"; 
      sAux = sAux + "https://play.google.com/store/apps/details?id=com.krsna \n\n"; 
      i.putExtra(Intent.EXTRA_TEXT, sAux); 
      Uri uri = Uri.fromFile(convertBitmapToFile(bmp)); 
      i.putExtra(Intent.EXTRA_STREAM, uri); 
      startActivity(Intent.createChooser(i, "choose one")); 
     } 
     catch(Exception e) { 
      Log.i("Radhe", e.toString()); 
     } 
    } 

但是,當在Facebook上分享時,它只顯示圖像和沒有說明。我認爲setType(image/*)存在一些問題。那麼有人可以告訴我們什麼是解決方案。提前致謝。

+0

http://stackoverflow.com/questions/23541823/how-to-share-text-and-image-on-facebook-using-intent – sasikumar

+0

HTTP:/ /stackoverflow.com/questions/22533773/android-how-to-share-image-with-text-on-facebook-via-intent – sasikumar

回答

相關問題