1

First I subscribe to auth.authResponseChange and auth.statusChange.

My Init call looks like this:

FB.init({
   appId  : app_id,
   status : true,
   cookie : true,
   channelUrl : 'http://domain.com/channel.html',
   frictionlessRequests:true,
   xfbml : false
});

When logged in as a user it works fine.

However, when logged in as a page auth.authResponseChange and auth.statusChange are never called. I also tried setting status: false and calling FB.getLoginStatus(callback_function) but the callback function is never called.

I'm pretty sure this is a bug, but is there a workaround??


Also worth mentioning -- I get the following error in the console:

Refused to display document because display forbidden by X-Frame-Options.

I added the header X-Frame-Options: GOFORIT to my page but the error remains.


The following SO questions are related but the answers do not really help:

The last link above says to call FB.login() which will automatically warn the user if they are logged in as a page. However, calling login() is exactly what I'm trying to avoid doing.


Added Later: Facebook thinks that this bug has been fixed.

Community
  • 1
  • 1
Gil Birman
  • 35,242
  • 14
  • 75
  • 119
  • What's your use-case here? As far as I know the API doesn't work when logged in as a page, are you just trying to detect that case and work around it? I suspect the only workaround is a call to login() or showing a social plugin which has an explicit error message – Igy Sep 14 '12 at 21:24
  • "are you just trying to detect that case and work around it?" << YES. Pretty much I want to know if there's a workaround that doesn't require calling login().... this bug doesn't make my app unusable, but it adds an extra step for someone logged in as a page. I'd like to be able to warn them right off the bat. I know I could do that by redirecting to a *getLoginUrl* URL but I'm trying to avoid that as well.... I don't like the social plugin workaround either. – Gil Birman Sep 14 '12 at 21:41

1 Answers1

2

The issue with getLoginStatus not working for users signed in as a page is a known one which will be resolved with the push on Tuesday.

Sean Kinsey
  • 37,689
  • 7
  • 52
  • 71
  • this problem is happening for me now. it was supposedly fixed a while ago (as stated in your answer and also here: https://developers.facebook.com/bugs/244490742333859) BUT I'm still seeing the problem. any chance you could check into it for me? – Nathan Labenz May 16 '13 at 17:12
  • This will be fixed on Tuesday again. – Sean Kinsey May 18 '13 at 00:46