【发布时间】:2014-02-18 12:17:50
【问题描述】:
众所周知,Facebook 的分享意图非常有限,在 facebook 上你只能分享 url,不能分享文字,也不能分享图片,只能分享 url。
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "http://test.com");
sendIntent.setType("text/plain");
startActivity(Intent.createChooser(sendIntent, getResources().getText(R.string.send_to)));
如果你用 facebook 试试这个,它不起作用:
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_STREAM, uriToImage);
shareIntent.setType("image/jpeg");
startActivity(Intent.createChooser(shareIntent, getResources().getText(R.string.send_to)));
但是……我怎么可能在 facebook 上分享我的官方 android 画廊中的图像?
我确信有一种方法可以像官方 android 画廊那样在 facebook 上分享图片。 ¿如何实现?
PD:我需要在没有 facebook SDK 的情况下执行此操作,android gallery 不使用 facebook sdk。
【问题讨论】:
-
我也对此感兴趣 - 你找到解决方案了吗?
标签: android android-intent share android-facebook android-sharing