2014-12-25 28 views
0

我想從使用Facebook SDK的消息或說明的本地用戶設備發佈圖片,我在這裏查看了一些舊的解決方案,但是我想用最後一個Facebook的SDK版本(3.5) 我可以通過這個代碼後的圖像,但我無法添加描述或消息使用最新版本的Facebook SDK for Android發佈圖片及描述

public void shareImageNow(Activity activity, String message, 
     Bitmap bitmap, UiLifecycleHelper uiHelper) { 
    List<Bitmap> images = new ArrayList<Bitmap>(); 
    images.add(bitmap); 

    if (FacebookDialog.canPresentShareDialog(
      activity.getApplicationContext(), 
      FacebookDialog.ShareDialogFeature.PHOTOS)) { 
     // Publish the post using the Photo Share Dialog 
     FacebookDialog shareDialog = new FacebookDialog.PhotoShareDialogBuilder(
       activity).addPhotos(images).build(); 
     uiHelper.trackPendingDialogCall(shareDialog.present()); 
    } else { 
     // The user doesn't have the Facebook for Android app installed. 
     // You may be able to use a fallback. 
    } 
} 

感謝

回答

1

無法通過共享對話框。所有消息應該由用戶生成,並且如果您使用共享對話框,那麼在對話框中有一個選項可供用戶添加消息或說明。

相關問題