Hi Dave
In order to enhance facebook page / app profile, and make it much more attractive I think that we should allow for dynamic content / form submission ... via application tab.
this is much needed to improve user experience ( not have to search for the "go to application" small and unatractive button), give the user updated and relevant information and make it very easy to fill out forms for registration/reservations and such
the question is if the new dev versoin 6.x.3.x can support that kind of requirement .
( I have bumped into beautiful facebook pages with smart landing pages/ dynamic content / form submission etc ... and thought that we (the drupal4facebook users) must have that capability.
for now it is not possible to do so cause the first ovious problem I'm encountering is the number of CSS links in the page among other error message I see.
Best Regards and thanks in advance.
Arin
Comments
Comment #1
Dave Cohen commentedFor now, use the 2.x branch, which has an example theme supporting FBML.
I mistakenly thought I could remove that in the 3.x branch, because I read on facebook.com that they no longer recommend anyone develop new apps in FBML (use iframe instead). I removed FBML support in 3.x in order to greatly simplify fb_canvas.module.
I plan to support profile tabs in the 3.x branch, hopefully later this month. Probably with a new fb_tab.module which can be enabled only when users want to support profile tabs.
Comment #2
arinba commentedThanks for your rapid reply
By the way I use the 3.x-dev in my production site ( it is a simple usage however I needed the social plugin support ) and I saw that there is more recent build, is the upgrade should be as usual ( meaning backup both DB and directory tree ,moving to offline, extracting the package and running update.php and finaly updating the application by saving ) or there upgrade path is not supported ?
When support of FBML is ready for 3.x-dev - can please make a note so we will know that we can use it in this version ?
Thanks in advance and have a great weekend
Arin
Comment #3
mellenger commentedIs there any way to make tabs on fan pages using iframes? I'm running into the same problem as arinba, im using 3.x, and I want to use google maps in the tab, will that even be possible? You can't use google maps with canvas pages can you?
here's the app page (it's ugly right now) http://apps.facebook.com/tboothstores/ - which works
here's it in a tab: http://www.facebook.com/pages/Phoney-Mart/143323569012792?v=app_11900554...
Dave, I was at your BOF session at DrupalCon SF, it was really great. This is my first attempt using the module.
Thanks,
Andrew
Comment #4
Dave Cohen commentedSadly no. The profile tabs allow only FBML and not iframes. You have to link the user out to a canvas page. It's a pain.
The 3.x branch does not yet have much support for profile tabs but that remains on my todo list.
Comment #5
Dave Cohen commentedI've added modules/fb/fb_tab.module. It's not very mature, but offers some help making tabs.
Tabs must be FBML, not HTML (due to limitations of facebook). So advanced drupalers may prefer to implement a menu callback which produces an FBML page (with links out to full-fledged canvas pages that are much easier to develop).
Alternately, implement an FBML theme. There is an example in the 2.x branch. Would any volunteer like to modify that theme for the new profile tab width?
Comment #6
kmrenehan commentedReally great module! Running into some trouble with page tabs using your (now deprecated) FBML theme after upgrading from 2 to 3. Theme seems to be passing the CSS by relative url instead of absolute, which of course doesn't work. This wasn't the case in 2x. I'm getting this message
The static resource URL was malformed: sites/mysite/files/css/optimizedcssfile.css
Any known solution to this? I'm not much of a themer, so I'm not sure how this optimized css file gets created or included, just that it does.
Comment #7
kmrenehan commentedTo clarify, the message is actually in the html on my otherwise-successful tab. When I inspect what should be my css link tag in firebug on the facebook tab page, that message is in the css link element in place of the actual css code.
Comment #8
Dave Cohen commentedProfile tabs are not regular pages. You have to handle them with a callback that produces FBML, or enable an FBML theme.
This will be documented better on the documentation pages, eventually (volunteers?).
For those of you who know your way around a drupal theme, look at this example of an FBML theme specifically for 520px wide profile tabs.
Comment #9
kmrenehan commentedThanks for the response. My tab call back is returning FBML-- I started by modifying your FB_FBML theme from version 2. Running into the same problem with this tab theme though, (relative URLs instead of absolute) so I think it might be a conflict with another module. Rolling back to version 2 for the time being, will upgrade to 3 when canvas pages support iFrames.
Thanks!
Comment #10
rei commentedHi Dave, I'm using 'fb_tab_fbml' example you provided as the 'theme for profile tabs' and set the path to 'fb_tab/view', this resulting Blank page tab. Am I missing something here ? and when I change the path to 'node/1' the tab display error 'FBML Error (line 29): illegal tag "body" under "fb:tab-position"
Comment #11
Dave Cohen commentedThat error means the theme is not being used. Are you sure you've enabled it?
Comment #12
rei commentedok, this is the combination of results I encountered, the only working condition is if the site default theme set to fb_tab_fbml, which means the main site has to use tab theme?. the path: fb_tab/view always display blank tab.
normal'>theme for profile tabs
normal'>Tab Path
normal'>Result
normal'>Garland
normal'>system default
normal'>fb_tab/view
normal'>Blank Tab
normal'>Garland
normal'>fb_tab_fbml
normal'>fb_tab/view
normal'>Blank Tab
normal'>Garland
normal'>system default
normal'>node/1
normal'>Blank Tab
normal'>Garland
normal'>fb_tab_fbml
normal'>node/1
normal'>Blank Tab
normal'>fb_tab_fbml
normal'>system default
normal'>fb_tab/view
normal'>Blank Tab
normal'>fb_tab_fbml
normal'>fb_tab_fbml
normal'>fb_tab/view
normal'>Blank Tab
normal'>fb_tab_fbml
normal'>system default
normal'>node/1
normal'>Works
normal'>fb_tab_fbml
normal'>fb_tab_fbml
normal'>node/1
normal'>Works
Comment #13
Dave Cohen commentedYou should enable the fb_devel.module whenever you're troubleshooting or developing with modules/fb. It may help you in this case. It tries to detect when the theme is initialized before modules/fb gets a chance to change it.
For the fb_tab/view callback to work, your module needs to implement hook_fb_tab. The fb_tab.module is not yet documented, so there's no way to know that. I'll post a link here when it is.
Comment #14
Dave Cohen commentedJust flagging this as one of the issues to resolve before 3.0 is released.
Comment #15
Dave Cohen commentedI've improved fb_tab.module a bit, adding some helpers to make this easier.
And perhaps even more important, there is some documentation to follow. http://drupal.org/node/956034
Comment #16
rei commentedFollowing the doc with the latest dev, on the 'Simple Case', still not working.
default drupal theme: garland
fb_tab_fbml theme : enabled
application setting:
Theme for canvas pages: garland
Theme for profile tabs: fb_tab_fbml
tab name: welcome
path: node/1
Testing with Firefox
canvas type: iframe => working properly.
TAB page:
IF login to facebook with the same drupal admin account : Full of error message
IF login to facebook with other account : Blank Tab.
Please see the Screenshot attached.
Comment #17
Dave Cohen commentedas always when troubleshooting, enable fb_devel.module and add the devel block to all your themes. Reproduce the error and check your log for any notices.
I'm curious whether the fb_devel block reports that it is serving a profile tab or some other kind of page.
Comment #18
rei commentedthe fb_devel.module is already enabled on both canvas and fb_tab_fbml all the time, but as you can see at the screenshot the tab page only consist error message or blank tab. the devel block appears only on canvas iframe.
Comment #19
Dave Cohen commentedWhen you get the error message about the body tag, there might be a message written to the drupal log about the custom theme being set too late.
The blank tab is essentially a "white screen of death". In these cases there's usually some error behind the scenes. or maybe a drupal module is trying to do a redirect, which can't work on tabs. Try "fb/devel/tab" instead of "node/1" and see if anything displays. Also allow anonymous users to view devel info.
Comment #20
rei commentedthe path fb/devel/tab is working properly with no error.
ok, the node/1 shows up after I enable the "OAuth 2.0 for Canvas (beta)" option under migrations section on application setting. the error message 'FBML Error (line x): illegal tag "body" under "fb:tab-position' also Dissapear.
- "HTML error while rendering tag "img": Relative URLs not allowed here" Dissapear after I disable site Logo on the fb_tab_fbml theme setting. (is this limited to logo or any image?)
The still remaining error:
-"HTML error while rendering tag "link": There is a hard limit of 2 css link tags on profile tabs in order to remain under the IE 31 tag limit."
-"HTML error while rendering tag "input": password_inputs forbidden by flavor TabFBMLFlavor"
- FBML Error (line 85): unknown tag "fb:like" (from the fb_example.module I suppose)
================================================================
style.css on fb_tab_fbml never get loaded, tab page displayed with no style, why?
with firebug I also catch http error '400 Bad Request' on /misc/favicon.ico and /modules/node/node.css
================================================================
Facebook Devel Info
Page Status = Global fb instance is set, but page type unknown (profile).
local user = Anonymous
Comment #21
marcus178 commentedI'm really struggling to get this to work all I get is a white screen on my tab.
I have tried fb/devel/tab but still get a white screen
fb_tab_fbml theme : is enabled and selected as the theme in Profile tab settings and I have tried adding the following a custom module
and even
just to see if I could get something to display
Also even if I go to mysite.com/fb_tab/view I get a blank page and viewing the page source shows there is absolutly nothing there.
Comment #22
Dave Cohen commentedtry
Assuming your module is custom.module.
Comment #23
marcus178 commentedOk that's a bit better in that if I goto mysite.com/fb_tab/view I get my view but I'm still get a white page on my tab