mfujica
mfujica

Reputation: 144

Facebook Reveal Tab only working on https

I've created a simple Facebook Reveal tab, which was working some time ago until I checked again today and it seems only to be working on https.

This is what I get on an http page:

if I var_dump the Facebook object (using Facebook's PHP SDK):

object(Facebook)#1 (7) {
  ["appId":protected]=>
  string(15) "#####"
  ["appSecret":protected]=>
  string(32) "#####"
  ["user":protected]=>
  NULL
  ["signedRequest":protected]=>
  NULL
  ["state":protected]=>
  NULL
  ["accessToken":protected]=>
  NULL
  ["fileUploadSupport":protected]=>
  bool(false)
}

If I var dump

$signed_request = $facebook->getSignedRequest();

I get NULL

What about people who land using http?

I tried a header('Location') to the https URL for the same page and I tried specifying the https page for both Page Tab URL and Secure Page Tab URL in the App settings but both do not seem to work.

Does anybody else have this problem? Is this because of a due Facebook update?

thanks!

Upvotes: 3

Views: 461

Answers (1)

antonio
antonio

Reputation: 66

You have to make sure that there is no redirect. It is possible that your page only works on https. If that's the case, it is likely that when somebody that uses facebook on http goes to that page, the page does a redirect from http to https and looses the variable $_REQUEST['signed_request'] So basically your page needs to work on both protocols without a redirect.

Upvotes: 5

Related Questions