I was wondering if anyone knew a good way of creating an AS3 Facebook share button? I need to be able to customize the title, description and picture. Thanks!
A:
It depends on what you wish to share.
You can use the following url in a button:
http://www.facebook.com/share.php?u=http://www.mypage.com/
which will pop up a page prompting the user to log in and share whatever they want to share.
Could you be more precise as to what you want to allow your users to share?
Christopher Richa
2010-03-25 16:15:55
I just want the ability to share the location of the application, I know I can do it the way you explained above, but I wont be able to customize the title, description, etc...because AS3 can't pass off meta tags?
alvincrespo
2010-03-25 19:43:39
+2
A:
Look: http://www.facebook.com/facebook-widgets/share.php
http://www.facebook.com/sharer.php?u=<url>&t=<title>
In 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');
}
For use a picture you need to share the page has some Metatags.
<meta name="title" content="my title" />
<meta name="description" content="my description" />
<link rel="image_src" href="images/thumbnail_image.jpg" />
For more info: wiki.developers.facebook.com/index.php/Facebook_Share/Specifying_Meta_Tags
Otaku RzO
2010-03-29 17:17:18
Hmm very interesting, I didnt think about it that way. Thanks for the tip, Ill check this out and let you know how it worked :)
alvincrespo
2010-03-31 08:03:59
A:
Nice thank you. Good luck getting that like button to function in Flash...
Michael Benin
2010-08-08 03:56:44