如何在使用FB.ui时控制SWF尺寸(宽度/高度),方法:“feed”

发布于 2024-12-25 12:17:02 字数 813 浏览 1 评论 0原文

我使用以下代码将 SWF 发布到用户墙上。一切正常且看起来不错,除了在新的时间线上 SWF 超出了帖子栏的边界。看起来 FB 将宽度设置为 398px,无论我做什么。在 AS3 中,我将 SWF 设置为无比例 (stage.scaleMode = StageScaleMode.NO_SCALE;),但 FB 并不关心。所以我想知道是否可以明确设置宽度和高度。我查看了 api,没有找到任何“feed”方法。

        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);
        }

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);
        }

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

为你鎻心 2025-01-01 12:17:02

我不久前对此做了一些实验:这些是我的笔记:

嵌入时,swf 文件将缩小到 swf 嵌入标记大小的 80%。
例如:100x100 将显示为 80x80。
截至今天(2010 年 6 月 15 日)可显示的最大尺寸为:
460x466 将显示为 368x373

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

不疑不惑不回忆 2025-01-01 12:17:02

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

他们有关于如何调整播放器的详细信息。直到最近我才知道这是可能的。但是,您可能需要更改发布到提要的 URL,以指向具有 og: 标签设置的页面,如该博客文章中所述。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文