A simple example, using ColdFusion, demonstrating integration with Facebook oAuth.
The code demonstrates using oAuth, to request various permissions for a Facebook application, with the aim to retrieve an authorisation code specific to the logged in Facebook user.
You'll need the following to make use of the example:
- create yourself a Facebook application (remember to enter an app domain that is accessible to Facebook and will resolve to your code; and use the same domain in the Website section)
- update Application.cfc with your specific details including client id, app secret, redirect uri and the permissions you require
Hi - attempting to use your code, which looks great. Hope you can help.
I have entered the 'client_id' (called app id on the app config page), the app secret, a redirect uri (starting with http://localhost) and the requested permissions into the struct in Application.cfc.
When running index.cfm i get this error message:
Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.
Why?
Can it be because I am using localhost in the site url and redirect url, or that I haven’t entered anything in the field for App domain on the app config. page?