views:

39

answers:

3

Hello.

I just created a Facebook application and it can be found here:

http://apps.facebook.com/tufuturo-ecoflora/

The deal is that when a Facebook user adds the application to it's profile and allows it it shows like inside an iframe with a gray or black fade that seems to be weird. Don't know why!!!!

Can you replicate this behaviour??

Can you tell me please if this is normal and how can I fix it??

Thanks!!!!

A: 

I haven't installed it to my profile, but even by default it shows gray fade that comes from this div in your iframe:

<div onclick="top.location.href=window.location.href" style="opacity: 0.5; position: absolute; top: 0px; left: 0px; min-width: 9999px; min-height: 9999px; width: 100%; height: 100%; z-index: 1000001;"></div>
serg
mmm unfortunelly that code and that iframe is added by Facebook. Facebook embeds the app inside an iframe and the very first time that my app is added to a profile it shows that awaful gray layer. I expected for there to be a way to create a FB app without that anoying gray mask. Thanks anyway.
Jean Paul
A: 

You are redirecting the user to the authorization page at some point (via a Location header) (the https://graph.facebook.com/oauth/authorize URL). Instead, you want to echo out some JavaScript to do the redirect on the top frame:

<script>
  top.location = 'https://graph.facebook.com/oauth/authorize?client_id=113054992072493&amp;redirect_uri=http://www.jeanpaulruizvallejo.com/jeanpaul/arkix/Ecoflora/Tu_futuro_v_3/prueba01_redirect.php&amp;scope=publish_stream,user_about_me,user_birthday,user_photos';
</script>

Or you could use the JS SDK which has the FB.login() function to make this transparent, for example: http://apps.facebook.com/fbrelll/auth/session

daaku
I did as you say,,, it seems to be the solution but there's a problem, i changed the index.php page that makes a header location to the oauth page,,, but the application was trapped in some sort of infinite loop cicle,,, so there has to be something else to be done beside adding top.location = 'https://graph.facebook.com/oauth/authorize?client_id=113054992072493Thanks for the idea.
Jean Paul
Do you have a repro case? Your original URL still does the in-iframe redirect and doesn't have the infinite redirect issue.
daaku
A: 

Already solved it by myself using a mix of session vars and asking the case, in one time I make a php header location and in another I make a JS top.location.

Jean Paul

related questions