0

In my symfony project, I have integrated HwiOAuthBundle for different social logins (twitter, facebook and google) and everything is working perfectly. We are collecting the oAuth tokens for each of these providers as well as the user id.

Now my question is, how can I make an Authenticated API call to one of these services using these tokens with the help of HwiOAuthBundle (or any other way) from my symfony controller

Any help will be highly appreciated.

Hasin Hayder
  • 818
  • 7
  • 8

2 Answers2

0

For facebook, just call the graph API passing it the FB access token you saved in your DB: https://graph.facebook.com/.....?access_token=

same for linkedin, just use oauth2_access_token= instead

probably same/similar things for the other providers

Worked for me.

-1

Don't think that it is possible to do what you're asking. HWIOAuthBundle don't even save the tokens to DB by default.

Once you have the token, I think you need to use bundles/wrappers dedicated to each API.

Reydel Leon
  • 1,035
  • 2
  • 11
  • 34
  • 1
    Perhaps not by default, but it's trivial to add 'em in. Nice little gist showing an example of that [here](https://gist.github.com/danvbe/4476697). – Cameron Hurd May 06 '14 at 11:21