Search code examples
facebookintegration-testingweb-api-testing

API Integration With Facebook - Testing


I am working on API Integration Tests. In particular, I am trying to test the user's ability to login to our application with Facebook. Prior to signing in with our API, the user must sign in with Facebook on the front end of the application via the steps listed here. Since the tests going to be backend integration tests, I would like to handle the entire login in flow solely by leveraging Facebook's API. I can't seem to find any docs that illustrate a methodology to do what the these docs allow the front end to do. Does anyone have en experience with Facebook's API, and know how to simulate the login flow without actually using the login dialogue window?

Sign In Steps

  1. Log in to Facebook
  2. Log in to our API with Facebook returned authentication credentials and redirect uri

Solution

  • Their test user capability should help: https://developers.facebook.com/docs/apps/test-users

    It'll allow you to create & sign into a test account, then destroy it afterwards. It won't be limited to normal login & visibility restrictions either.