do I need to use the /lib folder that's included in the github php sdk?

I'm adding social login to my php app, and I'm not sure how this ties together. There's a config.php, which refers to a config.ini file. Do I need to put the contents of the lib folder from the sdk within my website? I followed the instruction here: https://docs.oneall.com/services/implementation-guide/ , but I don't see any specific reference to the github sdk files at all!

Answers

  • Hi,
    Right, the implementation guide is quite general and describes the flow for the login and integration with your app. Especially the tokens used for the endpoints.
    If you plan to use the SDK, then yes, you need the contents of the lib folder.
    More specifically, you just need the assets directory.
    You can shuffle things around though.
    The config.php reads the config.ini, which you can move around but change the code in config.php.
    The assets folder only contains 2 files. Again, you can move them around.
    These files are just wrappers for Curl. You can always use Curl directly.
    The examples files start with loading config.php, so you can modify that too.

    Not sure how this helps. Let us know how it goes. Good luck.
  • When adding oneall social login to a php project, is it better to start with the github files, or with the zip file from the oneall website, the one named oneall_php_sdk_1.0.zip. The two appear to be completely different!

    It would really help to have a more specific example of how to use oneall on a php project. It seems like most users are using a CMS like drupal, wordpress, joomla, etc.

    Please provide details on which code to start with, and an example would be much appreciated!

    Thanks!
  • Hi,
    Right. Use the Github version, the version on our web site is outdated, apologies, and thanks for pointing it out!

    This page gives a headstart: docs.oneall.com/services/implementation-guide/social-login/.
    (this page does not use the SDK)
    In summary:
    - on a web page, include the JS library, then add JS code that shows the icons. You must set a callback URL,
    - in the specified callback URL, add PHP code that recovers the necessary tokens, gets the user profile info and stores them for later use,
    - use the tokens to make more API calls in other PHP scripts.

    Let us know if you have any questions.

Welcome!

Please sign in to your OneAll account to ask a new question or to contribute to the discussions.

Please click on the link below to connect to the forum with your OneAll account.