var data =
{
message: "Posting SWF using FB.api",
display: 'iframe',
caption: "Caption Field",
name: "Name",
picture: 'http://www.example.com/image.png',
source: 'http://www.example.com/FlashMovieSample.swf',
link: "http://www.example.com/", // Go here if user click the picture
description: "Description field",
actions: [{ name: 'action_links text!', link: 'http://www.example.com' }],
}
FB.api('/me/feed', 'post', data, onPostToWallCompleted);
The above successfully posts a swf to newsfeed, but the swf has scrollbars. Facebook sets the swf width and height equal to the container (iFrame) width and height. The swf is 200px x 200px. Using smaller width and height on the swf size does not prevent scroll bars from showing. Using the old stream.publish with the expanded_width and expanded_height parameters also produces scrollbars. Using stage.scaleMode = StageScaleMode.NO_SCALE within AS3 helps, but does not prevent scrollbars. I’m out of ideas. Any suggestions?
This is a bug with the Facebook platform in the way that it formats the iFrame that contains the SWF. It does this for all video’s on the news feed, YouTube, Vimeo, Soundcloud, etc.
I would also say that you should not use “Source”, but rather define the OpenGraph meta data on the link you are providing. You should also supply both the
og:videoandog:video:secure_urltags, so people using Facebook with secure browsing enabled get an SSL version of your SWF.