我放了一个按钮来在 Facebook 上分享我的 Android 应用,所以我写了下面的代码
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
// add the app link
intent.putExtra(Intent.EXTRA_TEXT, "http://play.google.com/store/apps/details? id=com.phonelight.realparrot");
startActivity(Intent.createChooser(intent, "Share with Facebook"));
分享后,我打开我的 Facebook 帐户,看到以下内容:
如您所见,它应该是右边方 block 中的图像。我想知道如何放置该图像,我正在考虑放置我的图标应用
就像您分享 YouTube 链接一样,图像将是电影的第一张照片。
最佳答案
更改 intent.setType("text/plain");
intent.setType("image/*");
然后添加 intent.putExtra(Intent.EXTRA_STREAM, myImageContentUri);
关于android - 使用图像图标在 Facebook 上分享 Android 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15321090/