4

Joomla! 3.4.3

I'm looking for a working example on how to implement OAuth2.0 client code to Google, Facebook, etc.

I understand (and see) a variety of OAuth classes in the Joomla! library hierarchy, but no examples exist on how to instantiate/use them.

Base (abstract?) class: /libraries/joomla/oauth2/client.php

Google implementation: /libraries/joomla/google/auth/oauth2.php

Facebook implmentation: /libraries/joomla/facebook/oauth.php

Any help will be most appreciated.

1
  • Aaron, you now have the privilege to vote in our current moderator election. Please exercise your new democratic privilege.
    – mickmackusa
    May 6 at 4:47
1

You can load any PHP class in the libraries directory using the jimport method. Below are examples using the funds referenced in question.

 jimport('joomla.oauth2.client');
 jimport('joomla.google.auth.oauth2');
 jimport('joomla.facebook.oauth');

Joomla's code base is well documented so once you have a class instantiated any decent IDE will provide access to inline documentation.

I realize you asked for an example, but in my experience the SO community isn't in the "habit" of writing code upon request. You'll get more traction with questions when posting some code.

1
  • He is looking for some example or help. This is not really helpful. Mar 20 '17 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.