我想分享從閃存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
這就是爲什麼它不起作用的原因。這些頁面需要存在,即使它是虛擬的。 –