Heroku Facebook Invalid Credentials

If you get invalid credential error when hosting your application on Heroku check your application setting:

Step 1:
Canvas Type:
Make sure IFrame is selected.
Step 2:
Open FBUtils.phpand go to line 94, it reads

echo("<script> top.location.href='" . $authorize_url . "'</script>"); 

replace it by

echo("<script> window.location.href='" . $authorize_url . "'</script>"); 

and that’s all, you won’t get off of FB and your app will be inside the iframe!

3 thoughts on “Heroku Facebook Invalid Credentials

  1. I’m having this problem too, but your instructions didn’t work for me.

    I can’t actually find where it allows me to state the canvas is an iFrame in the FB developer section.

    I’ve edited the FBUtils.php but am not sure if that is committed or pushed to the heroku version after I did it.

    It’s not very good if their service sort of fails so easily. Surely they’d check it themselves you’d think?
    Not sure about using it if it is likely to be buggy.

  2. Hi, this does work, so confirming it for others.
    My problem was making sure the changes were committed properly, and then pushed properly to Heroku.
    It doesn’t really tell you if you fail in your terminal commands, and I’ve not a terminal/linux kind of guy.
    Thanks for posting this though. It saved plenty of frustration.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s