0

We're developing a mobile application for a web site that uses Wordpress and exposes a REST API through the WP REST API plugin. We have very little prior experience with Wordpress.

One of the requirements is to implement a login via Facebook feature, so that users could log in either by using their login and password or by using Facebook. The normal login is currently done with Basic Authentication. However, I cannot figure out how to implement the Facebook login part.

This seems to partially answer my question: https://stackoverflow.com/questions/12065492/rest-api-for-website-which-uses-facebook-for-authentication

But it implies that we'll need an additional API for sending the user access token to the server and validating it on the server-side.

3
  • what is the wordpress specific question here? integrating with FB SSO is not complex once you understand it, but I don't see how it is related to wordpress or even the rest api. I read very quickly the answer on SO and it seems to be correct also for wordpress Commented Feb 17, 2016 at 12:25
  • @MarkKaplun: well, the thing is built on Wordpress so this seemed like related to WP? Honestly, I was hoping that maybe someone knows or have written a plugin for exactly this purpose and I missed it somehow.
    – iosdude
    Commented Feb 18, 2016 at 3:15
  • 1
    See this plugin, its an implemention of that github.com/stevenquiroa/wp-rest-api-facebook-login See the files controllers/Controller.php and controllers/AuthController.php there is the code to validate from server. Commented Jun 16, 2016 at 10:08

1 Answer 1

1

This plugin offers a login via Facebook mechanism, but is only compatible with v1 of the REST API currently: https://wordpress.org/plugins/json-api-user/

4
  • 1
    so what is the point of the answer? rest api V1 is deprecated..... Commented Feb 19, 2016 at 14:21
  • 1
    No, it's not deprecated and it will be supported for a good while - as with most things WP - the plugin is also not so complex, so moving it to V2 is very viable.
    – Q Studio
    Commented Feb 20, 2016 at 15:03
  • 1
    The plugin also shows very clearly a workable route to achieve what you want.
    – Q Studio
    Commented Feb 20, 2016 at 15:04
  • rest api V1 is deprecated. If it shows a good way that is compatible to V2 then please summarize it here instead of sending people into doing an open ended research. Commented Feb 20, 2016 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.