Posted by Igor Benic

Web Developer who mainly uses WordPress for projects. Working on various project through Codeable & Toptal. Author of several ebooks at https://leanpub.com/u/igorbenic.

5 Comments

  1. This has been extremely helpful in getting my headless WP backend up and running using the facebook login SDK!! Its very rare to find help on headless wp builds/setups & process, site bookmarked! Great job of explaining and code sharing. Thank you so much for all the help!

    Reply

  2. How can I setup autoload help me please

    Reply

    1. Once you install the packages using composer, the autoload.php provided by composer will be enough to autoload classes.

      If you have not yet been introduced to composer, you can check their site: https://getcomposer.org/

      If you would like create your own custom autoloaders, you can then here is an article from Tom McFarlin about creating autoloaders for WordPress projects: https://tommcfarlin.com/simple-autoloader-for-wordpress/

      Reply

  3. protected $googleClient = ‘YOUR_GOOGLE_CLIENT_ID’;

    should i replace ‘YOUR_GOOGLE_CLIENT_ID’ with id i get from google console ?

    Reply

    1. Yes, that’s the long google client id. You can see for example in their own code example: https://developers.google.com/identity/sign-in/web/build-button#building_a_button_with_a_custom_graphic how they use the client ID.

      But in this code you use the whole part (.apps.googleusercontent.com included).

      Reply

Leave a reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.