0

I'm trying to create a simple script (node) that each day collects information from various APIs, including Facebook's Graph API.

The idea is simple, each day I want to collect the total friend count of my personal account, total page likes of my managed pages, total social interactions of my content (personal and from pages).

Now, if I was doing this in a web app, the normal route would be using facebook login to request the access tokens for my profile and pages, but since this is a script it does not have a public exposed url to return the authentication to.

Does anyone know of a way to manually get the tokens, to use in a scenario like this?

Thanks

1
  • 2
    You can manually create tokens in Graph API Explorer. Commented Jul 6, 2016 at 11:13

1 Answer 1

1

Have you tried to use this node package?

If you get an accesstoken via some other Oauth module like everyauth , connect-auth or node-oauth you can just set the access token directly. Most get calls, and pretty much all post calls will require an access_token

There is also a decent article on Medium which works through this process.

Sign up to request clarification or add additional context in comments.

1 Comment

I've looked at that package, but since this is to be run as a simple script I don't have a URL I can give facebook's API to return after the authentication.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.