CodeIgniter Forums
REST_Controller - Facebook return_url # causing problems? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: External Resources (https://forum.codeigniter.com/forumdisplay.php?fid=7)
+--- Forum: Addins (https://forum.codeigniter.com/forumdisplay.php?fid=13)
+--- Thread: REST_Controller - Facebook return_url # causing problems? (/showthread.php?tid=71120)



REST_Controller - Facebook return_url # causing problems? - regjel - 07-09-2018

I'm testing the Facebook social login feature and Facebook is prepending a hash "#" to the beginning of the args - this is stopping the GET args from being parsed by REST_Controller. Any ideas how to solve it??

Return_URL
.../index.php/api/v1/connect/index/

Response:
.../index.php/api/v1/connect/index/#state=9%7B7P%...


RE: REST_Controller - Facebook return_url # causing problems? - Pertti - 07-09-2018

(07-09-2018, 01:22 AM)regjel Wrote: Any ideas how to solve it??

Could you move the arguments to URL side?

Code:
.../index.php/api/v1/connect/index/arg1/arg2/.../#state=9%7B7P%...

Or are they suppose to come back from FB but instead of ?arg1=... they come back as #arg1=... ?


RE: REST_Controller - Facebook return_url # causing problems? - regjel - 07-09-2018

(07-09-2018, 02:25 AM)Pertti Wrote: Or are they suppose to come back from FB but instead of ?arg1=... they come back as #arg1=... ?


Yes, this. Facebook is prepending the # instead of ?.

To get REST_Controller to recognise the GET args I need to replace it with ?.


RE: REST_Controller - Facebook return_url # causing problems? - Pertti - 07-09-2018

Are you using this method:
https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow

Looks like they have couple, and Web option seemed JavaScript based, not back end solution.