Ramana Venkata
Ramana Venkata

Reputation: 350

Heroku - Created a facebook app with Node.js which gives type error

I am trying to create a facebook application and this is my first time. I read several articles on how to create one and I created an application from this page https://developers.facebook.com/apps. When I clicked on Go to App from facebook right after I created it. It is showing this error enter image description here

I have tried to look on Heroku dev center for same type of problem to resolve problem on my own I couldn't find any solution. When I do curl -v https://tranquil-oasis-2533.herokuapp.com it says HTTP/1.1 500 Internal Server Error. This is the output from heroku logs http://pastebin.com/0qdueiZE. Somebody please help me.

Upvotes: 5

Views: 1404

Answers (4)

ayniam
ayniam

Reputation: 595

This seems to be issue with sandbox mode. Disable sandbox mode. Here is the steps how you can do it. Go to https://developers.facebook.com/apps.

click "Edit Settings"

and selected radio button "disabled" for the "Sanbox Mode" under "basic info".

Hope this helps.

Upvotes: 1

civerson
civerson

Reputation: 66

This appears to be an issue with the faceplate module. It is described here: https://github.com/heroku/faceplate/pull/20

You have two options to get around the issue:

  1. Propose a fix to faceplate that works within the constraints of the Facebook application security here: https://developers.facebook.com/docs/ApplicationSecurity/

  2. Take your Facebook app out of sandbox mode.

Upvotes: 5

Sam
Sam

Reputation: 6552

My guess is that you aren't passing app as a local to the index.ejs template. If you're using Express, console.log(res.locals) before you res.render index.ejs. Is app in the logged output?

Upvotes: 0

phwd
phwd

Reputation: 19995

The error message points to what needs to be known

Cannot read property 'name' of undefined

<title><%= app.name %></title>

app is undefined. Probably want to check your web.js file to see what app is up to.

And ensure you have the latest node template for Heroku.

https://github.com/heroku/facebook-template-nodejs

Upvotes: 0

Related Questions