Resize iFrame in facebook fan page - facebook

I want resize the iframe height of my tab page. I am trying FB.Canvas.SetSize method, also I try with jQuery and javascript resize the iframe but donĀ“t work.
My application is not a Canvas.It is a tab page so i think "FB.Canvas method should not work with tab page".
How could resize my tab page on facebook profile?
How could drop the iFrame scrollbars on tab page?
Excuse me I also need to know if I could modify the share button with a custom image.
Thanks in advance

Provide some code
Make sure you have the Canvas Height option is set to Settable under the App Advanced Settings
Use asynchronous Loading of your JS-SDK and put your FB.Canvas.setSize(); inside the fbAsyncInit function
Please note that the fbAsyncInit function may fire (and hence your FB.Canvas.setSize();) before all images of your page are loaded! which means actual height of page is not reached yet!

Related

Change facebook page app height

Just before i start, i have searched for a long time and read many posts,
the Facebook page app is different from a normal app, at least when it comes to height.
I have a facebook page app (runs inside a facebook page) that runs inside facebook's iframe.
the iframe has a specifc height that i want to change to avoid inner scroll bar.
link
there is nothing about the height parameters inside the app settings.
any ideas?
thanks
Go into http://facebook.com/developers -> click to your app -> "Basic" menu item -> and there is the section called App on Facebook . There are parameters of canvas (width and height).
Hope it helps.

facebook login buttons in fancybox load correctly first time only

I'm adding facebook login buttons to fancybox (version 1.3.4) modals (one for join, one for login). The facebook buttons all get instantiated when the page loads, but are hidden. After triggering the fancybox login modal, the facebook buttons get rewritten in the modal and load correctly the first time. However if you close the modal and then reload it a second or third time, there is no facebook login button. It's just blank. When I look at the inline html block
that fancybox based the modal on, the facebook button markup that was generated when the page initially loaded is gone...actually not completely gone, but the button code deep in the iframe is wiped out.
I've seen suggestions to iframe these facebook buttons, so I tried adding an iframe instead of the raw facebook button markup. Note that I am not using the iframe fancybox type and I can't currently do that. When I include <iframe src="/myfacebookbuttonpage"></iframe> in the modal section, again it loads correctly the first time and then after closing the modal, looking at the source I can see the iframe rewritten as <iframe src="about:blank"></iframe> and the innards of the iframe are blank.
Anyone have any idea what's going on here? Or is this attempt to include facebook login buttons in fancybox modals completely wrong for some reason?
It's a bug in fancybox v1.3.2+ when using inline iframes.
As a work around, you may edit the fancybox js file or apply the workaround in your custom fancybox script.
Go here for further instructions

How detect if user view app in facebook frame or not?

I have disable scroll in my app, so there is only scroll from facebook - it looks cute and I like it, but if came to my app directly on site, there is also no scroll bar. I tried to detect if user load page with url http://mysite.com or http://apps.facebook.com/myapps, in both ways I get the same direct address link, so I cant detect if user view my app via facebook and I need to hide scrollbar or view it on site and I need to show scrollbar. So is there a way to detect how user view my app?
What server side language are you using? If you are inside the facebook iframe, your page will be requested with a post variable set called signed_request. You can check if that has been set in your code, if it has you know you are inside the facebook iframe, if it's not then you are on your site. From here you could either conditionally change your css to allow the content to overflow properly and get scrollbars, or redirect them into the facebook app.

Query related to fancybox in facebook page tab

I want to use fancybox in a facebook tab based page. In that page there are seperate pages loading in fancybox, but what is happening is I can not give width of that page more than 520px as my fancybox opens inside the facebook page so there is a scrollbars in my facebook page. Is there a way where I can load my fancybox as overlay on full page so there my new pages that are opening in fancybox can have more than 520px width.
Thanks in advance
No, you only have control over the space that Facebook gives to you in your iFrame. There are certain dialogs you can ask Facebook to display, see if one of them fits your needs.

Facebook iframe app with fullscreen popup?

With a Facebook iframe canvas app, is there any way to launch a modal pop-up (such as when clicking to magnify a photo, similar to http://fancybox.net/) that extends outside the bounds of the iframe's width? I'm thinking there would have to be some sort of communication with the _parent, but I'm not sure what's allowed or how to approach this.
In short, you can't.
Your application lives within an iframe within Facebook. You can't alter Facebook's code outside the frame (against their policy).
You can pop up a new browser window in full screen, if you'd like. But I'd question that as far as user experience goes.