Support for flash

SNiLD - December 23, 2007 - 17:42
Project:Drupal for Facebook
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

Facebook has some sort of scripting functionality for this.
The functions that are available are in:
http://static.ak.facebook.com/js/swfobject.js

The and tags could be converted from the original input and converted to a format that Facebook understands.

Facebook has integrated flash in their own "Video" application and an external application called "Jotcast" can do this stuff aswell.

#1

Dave Cohen - December 24, 2007 - 18:43
Status:active» postponed (maintainer needs more info)

What are you suggesting, exactly? You can create pages with the FBML necessary to embed flash.

Are you asking for facebook-aware filters which render flash one way on canvas pages and another way on "regular" themes?

#2

psi-borg - August 9, 2009 - 03:17

i added switches for each module that generates flash objects; this isnt a good solution but since i dont have much time,

if ($_REQUEST[fb_sig_in_canvas] == 1) {
  $fbswf_output = "<fb:swf {...}";
  $flashvars = {hack url for media file or drupal data};
}

kinda works - at least if i'm not using fbConnect, and the user comes to the non-fb site, they'll see the flash ok.

it doesnt work for fbml ...if for example I tell drupal to output

$output = "<fb:swf swfsrc='".$base_url."/movie.swf' />";

it will not output the movie for the cases (apparently facebook requires the
canvas callback url, but I tried both cases):

$base_url = {drupal global};

OR

$base_url = "http://apps.facebook.com/{fb_app_name}/{path to flash}/"';

for the second case, when I look at the html generated by facebook.com, it
returns the callback url in place of the $base_url

if I make directories such that the canvas callback url will be found when looking
for the movie, the app will not work at all.

I am at a dead end. please help ><

#3

psi-borg - August 9, 2009 - 16:44

it was fbConnect redirects for authentication that was causing this problem. a lot of time stumbling around in the dark, only to find i only need to turn one switch - fbConnect mod off, problem solved. well, i guess i learned a few things about apache url encoding that i'll prolly never use again, but yay! moving on...

#4

Dave Cohen - August 10, 2009 - 14:10

Wait I'm confused. Correct me if I'm wrong here...

You are adding flash to FBML canvas pages.

Using the absolute url of the swf is working for you. I.e. example.com/file.swf.

But fb_connect.module was doing something that was preventing that from working, until you turned it off???

Do I have that right?

#5

psi-borg - August 10, 2009 - 16:38

yes you have it right as usual.

let me clarify: flash support got added to both fbml/nonfbml themes so app can be used by nonfb users.

since each mod that uses flash wraps the output with <object> i used this switch inside the mod to output <fb:swf> instead

if ($_REQUEST['fb_sig_in_canvas'] != 1){...}

the problem is, even if i get the right fbml output for the canvas page right (according to <!--Rendering the page using the following FBML {...})

the player won't play, even if the flashvars exactly match those generated for nonfbml pages

eh... maybe this is it: "Facebook prevents direct script access from Flash with allowScriptAccess=none. To link or call JavaScript from your Flash object, you can use Flash localconnection and the fb:fbjs-bridge tag. "

#6

psi-borg - August 10, 2009 - 16:41

eh no that's not it... if i turn fbConnect on, not even fb:mp3 will play the url. fbconnect is mosdef doing something weird with the play url. not really sure what initializing fbconnect js across non canvas pages will accomplish for this app anyway. will still be able to use invite friends feature no?

#7

Dave Cohen - August 10, 2009 - 22:51

I'm no flash expert, but in my experience the <fb:swf>tag does what it is supposed to and I haven't had to do any crazy URL changes.

Sounds like the flash is embedded just fine (right?) but it tries to communicate back with your server and that is the problem? I've read your comments but can't tell what problem your describing.

#8

psi-borg - August 11, 2009 - 00:13

have you tried the audio module? works fine until it's used in fb_fbml theme, no problem - rewrap with fb's saran wrap. the player shows up but then if all of the fb modules are enabled and the app is configured as (fb is in sandbox mode):

Set Application Properties Automatically [on]
Extended Permissions: [all on]
Prompt New Users for Permission: [all on]
Register Local Users on Facebook [on]
Front page when user is not logged in to facebook: [blank]
Front page when user is logged in to facebook, but is not a user of the app: [blank]
Front page for users of this application: [blank]
Theme for FBML pages: * [fb_fbml]
Theme for iframe pages: * [system default]
Facebook Connect Primary [off]
Facebook infinite session settings [blank] << CULPRIT? dunno what this is for
Require Login: [Allow logged-in users]
Create Local Account: * [If user has logged in]
Map Accounts: * [Map account when both local uid and Facebook id are known]
Make Account Mapping Unique (experimental, not recommended) [off]
New user role: [authenticated user]
Not logged in user (uid): [0]
Logged in user (uid): [0]

it will not play in an fb app - unless you disable fbconnect.

 
 

Drupal is a registered trademark of Dries Buytaert.