Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
I try to etablish an Opauth facebook connect for a website. I done this before several time without problem, but it's been a long time, I forgot how it works... So this time, when facebook redirect to the callback, I get this :
Beside, The callback url is
which is my callback method. Where do I change that ?
Are you using Opauth directly, or are you using Auth's Opauth integration?
To change the callback, you have to login to the facebook developer website, select your app from the "My apps" dropdown, and then on the left select the "Settings" tab. The callback URL is defined under Website Site URL.
I'm using Opauth integration with Simpleauth.
I looked very carefully at the setting tab, there is nothing under the Website url field. In "advanced", I have a field for whitelisted callbacks but that's all. Are you sure the callback is not set in Opauth config and sent to facebook in uri params ?
I'm not an Opauth expert, I can only say how it is implemented in the app here. We only have one client app that has Facebook integration.
The Fuel Opauth class does allow a callback_url to be defined in the config that is passed to the class. If not present, it will try to construct one based on the path information in the config. This is the code that does that:
// and construct the callback URL if needed
// pop the method name from the path
$path = explode('/', trim($config['path'], '/'));
// and add 'callback' as the controller callback action
$config['callback_url'] = (empty($path)?'':'/'.implode('/', $path)).'/callback/';
This expects a path in the form "/this/is/some/controller/method". It will strip the last element, and replace it with "callback" so it becomes "/this/is/some/controller/callback".
Obviously this won't work if your path contains additional segments, your callback method isn't in the same controller as your login method, or your URL contains additional parameter segments. In these cases you will have to pass your custom url to Opauth in the config ( an optional conffig array is the first parameter of Opauth::forge() ).
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share
In this Discussion