So here’s where I’m at so far in terms of a challenge to learn Laravel and build a very simple website that uses Facebook API to authenticate users, and post information to their wall, as well as bring their posts into the website.
These are my notes on debriefing:
- I had to begin at the beginning, and learn everything about Laravel including composer, artisan, Node.js to use Gulp, to run Elixir to compile SASS. I also took a detour into setting up a VirtualBox and trying to setup Vagrant and Homestead. Some of the cognitive costs are around provisioning and overall setup, and these are never “fun” for me.
- I watched the first 6 Laracasts and learned about including some routes and blades ( about, contact, home) and “artisan make” for the built-in user authentication. I got a sense of where everything has a home within the Laravel setup, such as the controllers, routes, the “public” folder, add-on vendor items, resources/views, and the app config file and the very important “.env” file of environmental values such as database, mail details, and more.
- I added SammyK’s LaravelFacebookSDK code as well as the latest facebook sdk.
- I deployed a version of what I zipped up to a new Elastic Beanstalk AWS instance but was not (yet) able to get environment details to “correctly configure to “talk” with that database, so the site itself still says “sorry, cannot be found”, Ithink my .env settings are not correct for the RDS I set up.
5) What I was using: https://laracasts.com/series/laravel-5-from-scratch/episodes/
I was going to do the steps from the sample example for Login Redirect from herehttps://github.com/SammyK/LaravelFacebookSdk#login-from-redirect to test, generate errors and see how to get FB authentication to populate the users table.
For the database, I would have created a new facebook users table with uid, fbid, picture, where uid would have carried over from the existing users.id. However, I would first have had to learn how to use artisan migrate in order to create that as a real “migration”.
Then I would have followed
to embed some samples and see If I could load those directly from the logged-in user’s landing page
Then my plan was to use https://developers.facebook.com/docs/php/howto/example_retrieve_user_profile
to see about pulling from the open graph, and formatting the user’s last three items they posted. in a simple unordered list by using their Facebook ID.
In the past, I have used so many of the contributed modules in Drupal as a quick-and-dirty way to get something up-and-running, but thanks to this exercise I see the value of making a more tightly-controlled and more minimalistic set of functions.
I did get some basics to work on my local, including logging in and registering. So not a total loss!!!!!!
So to wrap up, this has been a great experience.
Here’s to continued learning!