Get access token using spring social facebook api

1.7k views Asked by At

I need to get the access token from Spring Social API in order to do operations Which the API doesn't provide.

for example push message to the client notification icon.

I followed spring social facebook via Spring offical doc:

https://github.com/spring-guides/gs-accessing-facebook

How to use the API in order to get the access token string?

thanks.

1

There are 1 answers

1
Craig Walls On BEST ANSWER

There is not currently a way to get at the access token directly. Instead, the Facebook interface offers a restOperations() method that will give you an instance of RestTemplate that is instrumented to put the Authorization header on every request automatically. You should be able to access the entire Facebook API via that RestTemplate instance with authorization.