1

I have a problem with my application. I use heroku config variables in localhost and APIs work well. In heroku server, it doesn't. I use the same variables and I have test them it's working (with dump method getenv() in DefaultController).

When I try to connect facebook here : [myapp].herokuapp.com/connect => OAuth error: "Error validating client secret." I use the same variables as localhost it's really weird.

With twitter, it is redirecting to connect page with no error message but it doesn't work too.

I put in facebook API redirect OAuth url this =>

http://[myapp].herokuapp.com/connect

http://localhost:8000/connect

Only localhost work. It's the same if I delete localhost from the list and Facebook API support now multiples URL OAuth.

1 Answer 1

0

Typically, this error means there's a mismatch somewhere. Either:

  1. the callback URL,
  2. the Facebook app ID, or
  3. the client secret

You might try printing out each of these variables to ensure they match what you've given Facebook (and Twitter).

1
  • Thanks jmccartie, print getenv() worked but not $this->getParameter() => return false. The solution is instead to use the parameter.yml.dist file like that: mailer_user: '%env(mailer_user)%' ;)
    – Thomas
    Commented Apr 11, 2017 at 19:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .