不能通过Android的Intent.ACTION_SEND到Facebook上分享视频的网址 [英] Unable to share video's URL on Facebook via Android Intent.ACTION_SEND
问题描述
我需要以编程方式共享视频资源URL。
URL的例子是 http://flash.video.worldnow.com/kold/KOLD_20110714204221200AA.mp4
I need to share URL on video resource programmatically. Example of URL is http://flash.video.worldnow.com/kold/KOLD_20110714204221200AA.mp4
我用Intent.ACTION_SEND吧:
I use Intent.ACTION_SEND for it:
Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "Test subject");
sendIntent.putExtra(Intent.EXTRA_TEXT, "http://flash.video.worldnow.com/kold/KOLD_20110714204221200AA.mp4");
sendIntent.setType("text/plain");
startActivity(Intent.createChooser(sendIntent,
"Share URL"));
Facebook的Android应用程序无法处理的URL,并显示以下错误:
Facebook android application can't handle the URL and shows following error:
Flash对象必须有swfsrc'和'imgsrc属性
如何避免错误?如何把必需的属性为text / plain的消息?
How to avoid the error? How to put required attributes into "text/plain" message?
推荐答案
我看了Facebook应用程序源(ShareLinkActivity),并没有发现任何可能添加必要的字段来分享请求。意图额外的参数Intent.EXTRA_TEXT的内容只有被使用。
I've looked at Facebook application sources (ShareLinkActivity) and didn't found any possibility to add required fields to share request. Content of intent extra parameter Intent.EXTRA_TEXT only is used.
这篇关于不能通过Android的Intent.ACTION_SEND到Facebook上分享视频的网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!