2

I'm using the following code to post a SWF to the users wall. Everything works and looks good, except on the new timeline the SWF goes over the boundaries of the post column. It looks like FB is setting the width to 398px, no matter what I do. In AS3 I set the SWF to no scale (stage.scaleMode = StageScaleMode.NO_SCALE;), but FB doesn't care. So I was wondering if I could set the width and height explicitly. I looked in the api and didn't find anything for 'feed' method.

        function postToFeed() {

            // calling the API ...
            var obj = {
                  method: 'feed',
                  link: link_url,
                  name: title,
                  caption: 'Blah blah',
                  description: body,
                  picture: image_url,
                  source: 'http://pathto.com/player.swf'
            };

            function callback(response) {
                //document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
            }

            FB.ui(obj, callback);
        }
rink.attendant.6
  • 44,500
  • 61
  • 101
  • 156
Chuck Morris
  • 1,128
  • 1
  • 8
  • 13
  • How did you manage to fix the size? Am using stream.publish and FB.UI. However I either get it to work on my wall but not on my feed. Would love to see your implementation code! – Komsomol Nov 05 '12 at 14:50

2 Answers2

3

I did some experiments on this a while back: these were my notes:

When embedded, swf files will scale down to 80% of the swf’s embed tag size. For example: 100x100 will display as 80x80. The maximum size displayable as of today(June 15 2010) is: 460x466 which will display as 368x373

Plastic Sturgeon
  • 12,527
  • 4
  • 33
  • 47
  • Today it seems - the maximum width of an embedded swf in Facebook is 403. If you give it more than that - it will make it 403 wide - and it will put a height according to the aspect ratio of the dimensions you put (so e.g., 640x480 will be 403x302 in Facebook....) – Yuval A. Mar 20 '13 at 16:52
1

See: http://www.longtailvideo.com/support/blog/19150/publish-your-videos-to-facebook-with-a-jw-player

They have a good detailed information on how to size up the player. I didn't know this was possible until recently. However you may have to change the urls of your posting to the feed to point to a page with the og: tags setup as they describe in that blog post.

DMCS
  • 31,720
  • 14
  • 71
  • 104