Im following Ryan Bates Screen Cast #360 Facebook Authentication...
When i get to to part where i click the link to log into facebook i get a
{
"error": {
"message": "Missing client_id parameter.",
"type": "OAuthException",
"code": 101
}
}
i tried restarting the server like previously stated Im pulling my hair out trying to figure this out
My site url at facebook development page is correct i've followed his steps hundreds of times
May be you have not setup the env
for FACEBOOK_KEY
and FACEBOOK_SECRET
In terminal (if you are using linux or mac)
$ export FACEBOOK_KEY=zzyzyzyzyzyzzy
$ export FACEBOOK_SECRET=zzyzyzyzyzyzzysbdbdsndnds
#now start rails from same terminal
$ rails s
this will now pass the values of FACEBOOK_KEY and FACEBOOK_SECRET to application.
Or second option
provider :facebook, ENV['FACEBOOK_KEY'], ENV['FACEBOOK_SECRET']
to this
provider :facebook, 'FACEBOOK_KEY', 'FACEBOOK_SECRET'
Diff between using two approaches.
The drawback of second type is, you need to keep the keys into the code repository. which is not a safe approach.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With