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

CommentFileSizeAuthor
#16 fbtab.jpg49.65 KBrei

Comments

Dave Cohen’s picture

For 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.

arinba’s picture

Thanks 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

mellenger’s picture

Is 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

Dave Cohen’s picture

Sadly 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.

Dave Cohen’s picture

I'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?

kmrenehan’s picture

Really 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.

kmrenehan’s picture

To 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.

Dave Cohen’s picture

Category: feature » support

Profile 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.

kmrenehan’s picture

Thanks 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!

rei’s picture

Hi 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"

Dave Cohen’s picture

That error means the theme is not being used. Are you sure you've enabled it?

rei’s picture

ok, 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.

style='border-collapse:collapse;border:none'>

normal'>Default drupal theme padding:0in 5.4pt 0in 5.4pt'>

normal'>theme for profile tabs padding:0in 5.4pt 0in 5.4pt'>

normal'>Tab Path padding:0in 5.4pt 0in 5.4pt'>

normal'>Result padding:0in 5.4pt 0in 5.4pt'>

normal'>Garland border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>system default border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>fb_tab/view border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>Blank Tab padding:0in 5.4pt 0in 5.4pt'>

normal'>Garland border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>fb_tab_fbml border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>fb_tab/view border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>Blank Tab padding:0in 5.4pt 0in 5.4pt'>

normal'>Garland border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>system default border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>node/1 border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>Blank Tab padding:0in 5.4pt 0in 5.4pt'>

normal'>Garland border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>fb_tab_fbml border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>node/1 border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>Blank Tab padding:0in 5.4pt 0in 5.4pt'>

normal'>fb_tab_fbml border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>system default border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>fb_tab/view border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>Blank Tab padding:0in 5.4pt 0in 5.4pt'>

normal'>fb_tab_fbml border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>fb_tab_fbml border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>fb_tab/view border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>Blank Tab padding:0in 5.4pt 0in 5.4pt'>

normal'>fb_tab_fbml border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>system default border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>node/1 border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>Works padding:0in 5.4pt 0in 5.4pt'>

normal'>fb_tab_fbml border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>fb_tab_fbml border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>node/1 border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt'>

normal'>Works
Dave Cohen’s picture

You 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.

Dave Cohen’s picture

Category: support » task
Issue tags: +fb3-blocker

Just flagging this as one of the issues to resolve before 3.0 is released.

Dave Cohen’s picture

Status: Active » Fixed

I'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

rei’s picture

StatusFileSize
new49.65 KB

Following 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.

Dave Cohen’s picture

as 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.

rei’s picture

the 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.

Dave Cohen’s picture

When 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.

rei’s picture

the 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

marcus178’s picture

I'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

function custom_fb_tab($op, $data, $return) {
if ($op == FB_TAB_OP_VIEW) {
  $return['custom_fb_tab'] = array(
        '#type' => 'markup',
        '#value' => views_embed_view('facebook_events', 'page_1', arg(1)),
      );
  }
}

and even

function custom_fb_tab($op, $data, $return) {
if ($op == FB_TAB_OP_VIEW) {
  $return['custom_fb_tab'] = array(
        '#type' => 'markup',
        '#value' => t('Display something'),
      );
  }
}

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.

Dave Cohen’s picture

try

function custom_fb_tab($op, $data, &$return) {
...

Assuming your module is custom.module.

marcus178’s picture

Ok 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

Status: Fixed » Closed (fixed)
Issue tags: -fb3-blocker

Automatically closed -- issue fixed for 2 weeks with no activity.