Talk:Fb:swf
From Facebook Developers Wiki
[edit] Incorrect fb_sig hash
The fb_sig hash passed by Facebook in flashVars does not match the MD5 of the other fb_sig_* variables. Something is wrong with the fb_sig recipe on fb:swf, and this needs to be fixed to allow Flash apps to interface with Facebook securely.
Using fb:swf, my Flash asset is receiving the following flashVars from Facebook:
fb_sig_added fb_sig_api_key fb_sig_expires fb_sig_profile_update_time fb_sig_session_key fb_sig_time fb_sig_user
...plus an fb_sig.
I pass all these from Flash to my server, where I create a string that looks like this:
added=1api_key=xxxxxxxxxxxxxxxxxxxxxxxxxexpires=0profile_update_time=1210011917session_key=24a3b5bc9aa72bb494eb785b-xxxxxxxtime=1211875218.6634user=xxxxxxxAPPSECRET
Then I take the MD5 hash of that, and it doesn't match the fb_sig given by Facebook. The variable names and/or values sent by Facebook are not the same set as those used to create the MD5 hash.
Other users have reported trouble as well: http://forum.developers.facebook.com/viewtopic.php?id=772
Please verify this and let us know when we can expect a fix. Thanks!
[edit] If the Video Doesn't Show On a Profile Page
Check out this thread: http://forum.developers.facebook.com/viewtopic.php?pid=31428
IMHO this info (about how you must use imgsrc) should be front-and-center on the article page for fb:swf...
--717295711 21:13, 3 January 2008 (PST)
[edit] Plans for Director / Shockwave .DCR support?
Currently it appears impossible to embed .dcr files except via an iframe. Thus, no .dcr's can be placed on profile pages. As a Shockwave developer this is very disappointing. Is .dcr support planned? Something like an <fb:dcr> tag? Shockwave is still in widespread use mainly due to it's extensive 3D capability that Flash does not support. PS, The 'book's API is quite phenomenal--congratulations.
[edit] Image Is Presented First
Is there a size that we need to keep this image under? And Why is it than when you change the image, the page will load old image? I have changed the location of the image but it keeps loading the old image (I deleted it of my server)! Does facebook store the image's on there server to load faster and if so how do we get rid of them?
To answer the question above about old images not removing. Facebook caches the image. You need to call refresh methods so that Facebook fetches a new one. ( I also think that Facebook only grabs them after some time period after the refresh is called) check out http://wiki.developers.facebook.com/index.php/Fb:ref
[edit] embed params
Does anyone know how to use "salign" exactly and which parameters it has ? Thanks!
[edit] wmode facts
I removed this sentence: The flash parameter wmode is set to transparent, which causes extensive problems under Firefox. According to Adobe, Firefox does not support wmode. I could not find such evidence on Adobe's website; in fact, this page specifically says that the following are supported:
- Internet Explorer 3 or higher (Windows)
- Internet Explorer 5.1* and 5.2* (Macintosh)
- Netscape 7.0*
- Mozilla 1.0 or higher*
- AOL*
- CompuServe*
Firefox uses the same rendering engine as Mozilla, so the original statement seems quite moot. Paul Borokhov 14:06, 2 August 2007 (PDT)
Hi Paul,
I have been trying to use a flash application that uses keyboard input. Unfortunately, when the wmode parameter is set to anything other than 'window' under Firefox, the Key.isDown function always returns false which makes it difficult (though not impossible) to get keyboard input.
This blog explains the problem: [1]
And this page has an example of the problem [2]
Is there a reason for the wmode to be set to transparent by default? Is it possible to get the wmode parameter in the <fb:swf> to be optional?
Cheers, --522652577 22:44, 11 August 2007 (PDT)
I would like to second the request for a wmode option. My flash contains MovieClips which the user can drag around the screen. With wmode=transparent I get a bug where sometimes the MovieClips become partially cropped while dragging. If I change wmode to window (without changing anything else at all) then the bug is gone. This occurs on Firefox and Internet Explorer.
An option for wmode would solve my problem. --626663746 22:47, 19 September 2007 (PDT)
[edit] waitforclick="false"
I could not get the waitforclick to work any advice
<fb:swf waitforclick="false" swfsrc="URL" width="605" height="491"> </fb:swf>
- waitforclick should work on canvas pages, but it doesn't for profile pages.--506843584 20:36, 15 August 2007 (PDT)
Hi,
I was under the impression that waitforclick will work for profile pages. "false does not work in profiles for security and aesthetic reasons, except after an Ajax call." Reference: http://wiki.developers.facebook.com/index.php/Fb:swf. The problem I'm having right now is that I'm returning the fb:swf from my PHP script, and the waitforclick=false is not working. What must I do to meet the requirements of "after an Ajax call?" --14215948 02:25, 13 September 2007 (PDT)
I have the same problem with you,i don't know how to fix it yet.who can help me:)
Yes. Why the hell isn't this working? The Flash won't activate unless I click even though I created the SWF object through FBJS and setWaitForClick to false. If that doesn't qualify as Ajax I don't know what will. --192000478 19:43, 16 August 2008 (PDT)
[edit] wmode
I don't see why wmode is set to transparent...it mucks up a lot of flash files and there's no reason for it...
[edit] AS3 Components Do Not Display
One of my projects uses two components (Flash 9 - AS3): Datagrid and Tilelist. These components work fine when viewed from the web page that Flash publishes (a typical .html, not in an iframe), but when they are displayed using the <FB:swf> tag the components don't display. I use both the typical drag/drop method to the stage and the addChild() function. I also tested using other addChild() methods with simple movie clips of shapes and that worked fine. It seems to be exclusively a component issue. Perhaps its a security settings issue. Does anyone have any ideas?
I am/was having a similar problem, though with the Slider component. It has something to do with the 'wmode' setting--if I use wmode='window' it works fine, but if i remove that line the sliders in my project disappear. 501012646 18:11, 28 October 2007 (PDT)
I also had this problem, in my case it was a little sporadic. Most recently, components (including List, Label, Button) were showing up fine on a Vista desktop and my macbook (FF, IE7 and Safari), but not on an XP machine (XP machine has player 9,0,47,0, I'll confirm the other machines). I should note that in the past I have seen the same Vista machine not produce the components (I actually thought Facebook had fixed something when I saw it last night). Despite regular testing, I don't recall ever seeing the problem on OS X. wmode="window" did the trick in my case as well.
A Fix: I've solved this problem. This link provided the clue. Seems that wmode transparent in Firefox will stop "Render" events from being sent. Calling component.drawNow() causes the component to draw. I've tested this with the textarea and scrollbar and it works. You will have to call "drawNow()" whenever you update the component (e.g reset the scrollbar maxScrollPosition) as it wont work on its own, however it will redraw in response to user input, so this is not a huge porblem. --208900213 20:28, 27 November 2007 (PST)
[edit] getURL? I take it this has been disabled?
Is there anyway to get around this?
using a target of "_blank" works, but nothing else I tried, eg "_top", did.
== Update: 2008/01/03
This, I believe is related to a recent change in FlashPlayer
http://kb.adobe.com/selfservice/viewContent.do?externalId=50c1cf38&sliceId=2%3Cbr%20/%3E
Is there any plans for FB to change the current policy of setting the value of AllowScriptAccess to "never"?
All navigation from within embedded fb:swf elements (other than target='_blank') is now broken as a result.
I second this. It's a big problem for developers wanting to use the JS API. --522767188 18:25, 23 June 2008 (PDT)
[edit] fb_sig_profile ?
is the fb_sig_profile information on the article page information outdated?
it looks like it should be fb_sig_profile_update_time which is getting passed rather then fb_sig_profile which I am not seeing being passed in at all, possibly just because I'm working on the canvas page?
either way fb_sig_profile_update_time is missing.
[edit] Disable right mouse click with swRemote parameter
It would be nice when you could add the feature to disable right mouseclicks on swf files.
This would be the parameter:
<param name=swRemote value="swContextMenu='FALSE'">
Here is the relevant Adobe TechNote on this:
http://www.adobe.com/go/tn_14555
[edit] scale parameter
scale - Possible values: showall, noborder, exactfit. default (Show all) makes the entire movie visible in the specified area without distortion, while maintaining the original aspect ratio of the movie. Borders may appear on two sides of the movie. noorder scales the movie to fill the specified area, without distortion but possibly with some cropping, while maintaining the original aspect ratio of the movie. exactfit makes the entire movie visible in the specified area without trying to preserve the original aspect ratio. Distortion may occur.
[edit] Pass User Name to Flash
One way to do this is by querying facebook and passing the result as 'flashvars':
<?php
$tmp=$facebook->api_client->fql_query("SELECT name FROM user WHERE uid=$user");
$nam=$tmp[0]["name"];
?>
<fb:swf swfsrc="http://www......................." flashvars="u_name=<?php echo urlencode($nam);?>" >
Then in your flash presentation, the global variable 'u_name' will contain the name --512493462 08:01, 7 December 2007 (PST)
[edit] How to add BASE attribute to EMBED/OBJECT tag?
We use RUNTIME SHARING in our Flash-application. But RUNTIME SHARING does`nt work without setting BASE attribute in EMBED tag (because the FBML default directory does`nt agree with the flash-application directory). How can we add BASE attribute using FBML or any other way?
I second this request. I think that like flashvars we should be able to customize certain embed parameters.
[edit] Missing black background from Flash file
I uploaded a flash file on Facebook. The background is supposed to be black, but it doesn't show on Facebook, only when I preview Flash, it plays like it should with a black background. Any ideas how this could be fixed? Thanks!
