I have read the read me...
I know this was an issue with canvas pages in rc2 (http://drupal.org/node/786390)
I've placed the facebook suggested code (http://wiki.developers.facebook.com/index.php/Resizable_IFrame) in my theme's (burnt) page.tpl.php file - at the very bottom of the body - have checked to make sure i don't have height set to 100% - but can't seem to get all the content to show. I've tried with garland and minnelli too.
I have selected the 'resizable' option in the fb applications settings page, as instructed.
So now i'm stumped.
Have others had this problem?
i must be missing something.
Everything else seems to work fine. I have fbconnect enabled of course.
help please!
Comments
Comment #1
rgsThought this might have to do with the fact that i had not installed the fb javascript library.
Followed instructions here http://wiki.developers.facebook.com/index.php/Cross_Domain_Communication...
Installed the library, created the channel file, put it in 3 different locations but nothing changed.
Still only partial content.
I am lost in the rabbit hole.
Comment #2
Dave Cohen commentedTake a look at http://apps.facebook.com/drupalforfacebook. View source.
It's a two-part problem. First there is a setting on the facebook site. Make sure your app is set to have resizable iframe canvas pages.
Second, you need some javascript on each page. I chose to just add this to page.tpl.php, right before the closure.
This works in conjunction with the 'fb_init' pseudo-event fired in fb.js.
There is a thread explaining this somewhere in this queue or on drupalforfacebook.org. I can't seem to find it right now. This should be documented under applications recipes here on d.o. Any volunteers?
Comment #3
rgsThanks Dave. I did some of this already but the code seems to be different. Will check it out now. When I get it working properly i will gladly volunteer to help with the documentation.
Comment #4
rgsOkay got this to work...and i will write up what i can for the documentation...
However...I had to enable 'new sdk's' on the migrations tab in facebook developer's edit application tab (otherwise you get the following -- Passed old-style fb_sig parameters. Go to http://www.facebook.com/developers/apps.php, edit your application. Under "migrations" enable "new sdks". )
Problem is when you enable the new sdk's drupal will only return the default theme. The theme you select under 'site building, facebook applications, list, edit, facebook canvas pages' does not actually show up when you access the application through facebook as a canvas page.
When i switch back by disabling the 'new sdk's' setting then it works as it should.
Comment #5
Dave Cohen commentedIf using "new sdks", you probably see the correct theme when you have authorized the app, but the default theme when you are not logged in or not authorized.
The trick is that using the "old sdks" facebook sends parameters indicating which application is requesting the canvas page. Using "new sdks" it stupidly does not send any clue in the request as to whether it is a normal web page or a canvas page. In order for modules/fb to determine that in this case a canvas page is requested, you must enable url alters. To do this, include fb_url_rewrite in your settings.php. The bottom of your settings.php should look something like
Replace "profiles/custom/modules/fb" with the path to your modules/fb.
Comment #6
rgsDave - Worked great thanks. Will start writing up this, the canvas resizing and add to fb node check box to the recipes this weekend to help add to the documentation. Should i just add as comments? Let me know if you'd prefer it done some other way. Thanks for all your hard work.
Comment #7
Dave Cohen commentedI would say make a new page in the documentation for the canvas resizing. I'm not sure what "add to fb node check box" means.
Comment #8
rgsOkay. Though I might have spoken to soon as the gremlins and ghosts seem have invaded my site with reinforcements. When i get my head around it all I will certainly make a new page in the documentation. What i meant by 'add to fb node check box' was http://drupal.org/node/778314 Sorry.
Comment #9
rgsI forgot to mention the canvas resize issue seems to be fixed in firefox but nothing else - not ie7, safari for windows or chrome. I seem to remember seeing something on the facebook developers site about a bug in explorer (though it could have been a bug about just about anything). Any ideas?
Comment #10
Dave Cohen commentedIt was never clear to me why the wiki recommended this markup at the bottom of the iframe. You could try it and see if it matters.
Do you notice these problems on http://apps.facebook.com/drupalforfacebook ???
Comment #11
drifter commentedI can confirm that this works. Couldn't find documentation about it, so added the following page under Troubleshooting:
http://drupal.org/node/952984
Don't know if it's the correct place...
Comment #12
Dave Cohen commentedWe're working on complete documentation. Admittedly we haven't gotten around to it all.
I've updated http://drupal.org/node/952984 to describe a newer and now recommended method, the one used on apps.facebook.com/drupalforfacebook.
Comment #14
robin van emden commentedThe solutions named at http://drupal.org/node/952984 & in this issue didn't work for me, chrome still showed scrollbars.
Needed to add style="overflow:hidden" to my page.tpl.php to make the extra scrollbars disappear.
Comment #15
robin van emden commentedComment #16
Dave Cohen commentedIf your content is too wide, the resize feature wont help. You may want to hide the overflow on wide content.
If the canvas resizes its height, the feature is working.
Comment #17
robin van emden commentedHi Dave, you are absolutely right. I was convinced my theme was 600px wide, but that proved not to be the case. My app is fitting in just fine now!