nikan
nikan

Reputation: 1203

Setting a local development environment for a facebook heroku app

I am trying to develop a facebook app on heroku. Working directly on the heroku platform with git pushing works fine but it's tedious and forces me to commit minor changes all the time. For this reason I am trying to setup a local development environment on my mac (snow leopard), following the instructions here. What I am getting though is a blank page. Apache's error log shows:

PHP Fatal error:  Uncaught OAuthException: Invalid OAuth access token signature.\n  thrown in /Users/<mymac>/Sites/<myapp>/sdk/src/base_facebook.php on line 1106

I am not sure what is wrong here. I have set a VirtualServer with the relevant environment vars pointing to the dev app.

Any suggestions?

Upvotes: 2

Views: 1216

Answers (1)

Christian Žagarskas
Christian Žagarskas

Reputation: 1227

putenv("FACEBOOK_APP_ID=xxxxx");
putenv("FACEBOOK_SECRET=xxxxxxxxxxxxxxxxxxxx");

cheers http://www.php.net/manual/en/function.putenv.php

add this to index.php at the top or AppInfo.php you are getting that error because

$facebook = new Facebook(array(
'appId'  => AppInfo::appID(),
'secret' => AppInfo::appSecret(),
));

does not know how to handle your request without the session var.

Upvotes: 3

Related Questions