Skip to content

Validate access token #121

Open
Open

Description

@RWOverdijk

Hello

I wish to validate, from my app, a user's acces token. I can do that using the debug_token endpoint in the graph api.

I can't figure out how to do that using library. Any pointers?

Activity

  1. ffflabs commented on Jan 31, 2018

    @ffflabs

    I use something in the likes of:

     const graph = require('fbgraph'),
      myApp = {
        FACEBOOK_APP_ID: 123456,
        FACEBOOK_APP_SECRET: 'asdfghjkl'
      },
      graph_options = {
        timeout: 36000,
        pool: {
          maxSockets: Infinity,
        },
        headers: {
          connection: 'keep-alive',
        }
      },
      user_access_token = 'mjNfsEUdvZCVs67DRld5rEAF1TPcuzfMQLzT251IjhwvZBEp7lMyeagd7ShKUezZCr0pdYghH4yZBLlbMjaGV';
     
     graph.setVersion("2.11")
     graph.setOptions(graph_options);
     graph.setAccessToken(`${myApp.FACEBOOK_APP_ID}|${myApp.FACEBOOK_APP_SECRET}`);
     graph.get(`/debug_token?input_token=${user_access_token}`, function (err, res) {
      console.log(res);
     });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions