我想知道是否有人知道创建AS3 Facebook分享按钮的好方法?我需要能够自定义标题,描述和图片.谢谢!
看:http://www.facebook.com/facebook-widgets/share.php
http://www.facebook.com/sharer.php?u=&t=
在Flash中:
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'); }
为了使用图片,请添加以下元标记:
有关详细信息:https://developers.facebook.com/docs/opengraph/