我想分享从闪存AS3网站的URL,我不能让它十分正常工作...... 我想在这里给出的两种方式:How to create a share button in AS3从AS3网站分享链接至Facebook
第一个作品:
import flash.net.navigateToURL;
import flash.net.URLVariables;
import flash.net.URLRequest;
import flash.net.URLRequestMethod;
share_btn.addEventListener(MouseEvent.CLICK, shareClickHandler);
function shareClickHandler(evt:MouseEvent):void
{
var varsShare:URLVariables = new URLVariables();
varsShare.u = 'http://domain.com/pageN.html';
varsShare.t = 'Title Page';
var urlFacebookShare:URLRequest = new URLRequest('http://www.facebook.com/sharer.php');
urlFacebookShare.data = varsShare;
urlFacebookShare.method = URLRequestMethod.GET;
navigateToURL(urlFacebookShare, '_blank');
}
但是,在帖子里说:
In order to use a picture add the following Metatags:
<meta name="title" content="my title" />
<meta name="description" content="my description" />
<link rel="image_src" href="images/thumbnail_image.jpg" />
但如何????
第二个解决方案演示如何添加参数:
var req:URLRequest = new URLRequest();
req.url = "http://www.facebook.com/dialog/feed";
var vars:URLVariables = new URLVariables();
vars.app_id = "000000000000"; // your application's id
vars.link = "http://YourSite.com";
vars.picture = "https://www.google.com/intl/en_com/images/srpr/logo3w.png";
vars.name = "name name";
vars.caption = "caption caption caption";
vars.description = "description description description";
vars.message = "message message message message message";
vars.redirect_uri = "http://YourSite.com";
req.data = vars;
req.method = URLRequestMethod.GET;
navigateToURL(req, "_blank");
,但它不是使用Facebook共享者..... 我试了很多很多不同的方式既解决方案结合了,但我得到什么,但奇怪的网址不工作...
请有人可以帮助我,或告诉我如何使用第二个解决方案,但与共享者?
非常感谢您的帮助
Ooooh好吧,谢谢!问题是这些标签是在我的as3应用程序中使用深层链接动态生成的....相应的html页面实际上并不存在... – user1425661
这就是为什么它不起作用的原因。这些页面需要存在,即使它是虚拟的。 –