Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Building a Social Network with Laravel and Stream? Easy!
Apr 19, 2017 @ 18:53:03

Christopher Vundi has continued his series covering the integration of Laravel and the Stream service in this new tutorial. In the first post he showed how to add "follow" handling to the application, complete with a real-time stream event when it happens. In this new post he uses some of the same handling to enhance this to a larger "social network" type application.

In the previous post, we saw how to add the follow functionality to a Laravel app. We also looked at how to configure our app to use Stream. This part will focus on: configuring our models in order to make it possible to track activities, the different types of feeds that Stream provides, getting feeds from Stream [and] rendering the different types of feeds in a view.

He starts in with the "activity field" functionality, a base level object that stores each event that happens in the system and is then relayed to Stream. Then, using the included "feed manager" in the Stream package, he shows how to use built-in feeds and add in a custom feed for follow and unfollow events. The tutorial then walks through the output process of the events, handling of the updates from Stream and routing those back out to the waiting news feed on the frontend.

tagged: social network follow event stream streamio service tutorial series part2

Link: https://www.sitepoint.com/building-social-network-laravel-stream-easy/

SitePoint PHP Blog:
Easily Add Social Logins to Your App with Socialite
Apr 06, 2017 @ 16:57:20

In the latests post to the SitePoint PHP blog *Reza Lavaryan * shows you how to use Socialite to add social logins to your Laravel application. Unfortunately the Socialite package cannot be used outside of Laravel.

Laravel Socialite is a package developed to abstract away any social authentication complexities and boilerplate code into a fluent and expressive interface.

Socialite only supports Google, Facebook, Twitter, LinkedIn, Github, and Bitbucket as OAuth providers. They won’t be adding any others to the list, however, there’s a community-driven collection called Socialite Providers, which contains plenty of unofficial providers for Socialite. More on this in the next section.

He starts off with the generation of the standard "auth" handling in Laravel using the "make:auth" artisan command. He then uses Composer to pull in the Socialite package and updates the Laravel configuration to enable it. Next up is the configuration for the different social services and migrations you'll need to make for database changes (on users table and adding a new "social logins" table). Next come the updates to the models, controllers, routes and providers to hook Socailite into the authentication process. To illustrate the overall flow, they show how to hook the application into GitHub as an auth source. The post finishes out talking about custom providers, using one to authenticate against Spotify and how to create your own.

tagged: social login socialite laravel package tutorial

Link: https://www.sitepoint.com/easily-add-social-logins-to-your-app-with-socialite/

SitePoint PHP Blog:
Social Logins with Oauth.io – Log in with Anything, Anywhere
Dec 22, 2016 @ 19:47:46

The SitePoint PHP blog has a tutorial posted from Meni Allaman showing you how to use the OAuth.io SDK for social logins, integrating multiple social network logins in one centralized place.

Users today often like the idea of logging into websites with a single click using one of their social accounts.

Given that, today we will look at OAuth.io, which is a multi-platform SDK for more than 120 social login providers like Facebook, Twitter, and Google+. Working with such an SDK is not a difficult task, but there are some prerequisites for using it.

The tutorial then breaks down the steps to follow for getting the service set up and getting the required package installed. Following this the author shows how to connect your account to the various services and provides the code you'll need to connect to the OAuth.io service. It finishes up with an example of a page you'd need to provide to your users to let them authorize the connection to the OAuth.io service with the service of their choosing.

tagged: social login oauthio oauth tutorial service package

Link: https://www.sitepoint.com/social-logins-with-oauth-io-log-in-with-anything-anywhere/

Codecourse.com:
Social Network with PHP: Introduction (Video Series)
Aug 28, 2015 @ 16:50:47

Codecourse.com has released a video series walking you through the creation of a simple social network site with PHP, Laravel and Bootstrap.

[This tutorial shows you how to create] a social network built with Laravel and Bootstrap. Authenticate, add and accept friend requests, post to a timeline, reply to and like statuses.

The videos are pretty "bite sized" at just a few minutes each, but they walk you through all of the code you'll need to get the site up and running as well. There's 36 videos in the playlist but with the playlist on auto-play you'll go through them quickly.

tagged: playlist video tutorial series screencast social network laravel bootstrap

Link: https://www.youtube.com/playlist?list=PLfdtiltiRHWGGxaR6uFtwZnnbcXqyq8JD

Matt Stauffer:
Using Github authentication for login with Laravel Socialite
Jul 17, 2015 @ 15:17:25

In a tutorial posted to his site Matt Stauffer shows you how to integrate Laravel with GitHub's authentication to link a user's profile to your application, made possible through the Socialite package.

Laravel's Socialite package makes it simple to authenticate your users to Facebook, Twitter, Google, LinkedIn, GitHub and Bitbucket. You can authenticate them for the purpose of connecting their pre-existing user account to a third-party service, but you can also use it as your primary login mechanism, which we'll be talking about here. I'm working on a new little micro-SaaS that is purely dependent on GitHub in order to operate, so there's no reason to set up any user flow other than just GitHub.

He starts with just a bit of insight into the overall flow of an OAuth connection with an application (which this is) and the pieces involved. Next he helps you get Socalite installed and working with your Laravel application. With this in place he shows you how to create a simple GitHub application and configure your Laravel instance with the provided client ID/secret and redirect URL. He adds in some routes to handle the two page requests and the controller methods to process the input. He makes a simple "users" migration to hold user information and a model to match. Finally he shows the result, stepping through the authorization flow, complete with screenshots.

tagged: laravel github social authentication login socalite package tutorial

Link: https://mattstauffer.co/blog/using-github-authentication-for-login-with-laravel-socialite

NetTuts.com:
Programming With Yii2: AuthClient Integration With Twitter, Google and Other Networks
Jun 26, 2015 @ 15:58:36

NetTuts.com has posted the latest part of their "Programming with Yii2" series today, this time with a focus on AuthClient integration allowing for easy interfacing with social services like Google or Twitter.

In this Programming With Yii2 series, I'm guiding readers in use of the newly upgraded Yii2 Framework for PHP. In this tutorial, I'll guide you through integration of the built-in AuthClient support to provide sign-in from third party networks such as Twitter, Google and Facebook.

For these examples, we'll continue to imagine we're building a framework for posting simple status updates, e.g. our own mini-Twitter, using our hello codebase. Use the GitHub links on this page to download the code repository. In Programming With Yii2: Integrating User Registration, I walked through integration of the Yii2-User library for user registration and authentication. In this tutorial, we'll learn how to integrate AuthClient with Yii2-User and override its views.

The tutorial starts off with a look at AuthClient: what it is, what it supports out of the box and which they'll be integrating (Google and Twitter). He shows you how to install the library via Composer and where to configure it, including the keys or secrets needed to connect to the provider of choice. For Twitter, he shows how to register a new "application" on their side and how to hook it into your own application and code. He advocates using an ".ini" file outside of the code to store the service credentials too. Finally he shows how to integrate it with the frontend, including the widget to override the default user login handling.

tagged: programming yii2 authclient twitter google social oauth

Link: http://code.tutsplus.com/tutorials/programming-with-yii2-authclient-integration-with-twitter-google-and-other-networks--cms-23489

SitePoint PHP Blog:
Social Logins in PHP with HybridAuth
Apr 16, 2015 @ 16:54:14

The SitePoint PHP blog has posted a new tutorial showing you how to integrate the HybridAuth library into your application for easy logins via popular social sites like Facebook, Twitter or even Google+.

A trend in many of today’s websites is a feature that allows users to sign in via their social network accounts. A classic example is the SitePoint community where users have the option to use their Facebook, Twitter, Google, Yahoo or GitHub account to log in without having to register an account. In this tutorial, we will be learning about HybridAuth – a PHP library that takes the pain out of building a social login feature. HybridAuth acts as an abstract API between your application and the various social APIs and identity providers.

They jump right into things, showing you how to install the library via Composer and configure it to work with a simple Slim-based application. They set up providers for Facebook, Twitter and Google+ and show how to call the "authenticate" method to make the connection. He then starts on the sample application, creating a login page and a database table for user tracking. The process continues showing how to connect the user from the social site to your setup and retrieve their profile information. All the code you'll need is here, including the Slim structure, the database connection setup and the needed templates. You can also find the finished product in this GitHub repository.

tagged: social login tutorial hybridauth facebook twitter googleplus socialnetwork

Link: http://www.sitepoint.com/social-logins-php-hybridauth/

SitePoint PHP Blog:
Adding Social Network Features to a PHP App with Neo4j
Feb 18, 2015 @ 18:06:38

The SitePoint PHP blog continues their series about combining PHP and the Neo4j graph database with part two, adding social features to the code they created in part one.

In the last part, we learned about Neo4j and how to use it with PHP. In this post, we’ll be using that knowledge to build a real Silex-powered social network application with a graph database.

Author Christophe Willemsen dives right back into the code showing how to get the basic application up and running (using Silex, Twig, Bootstrap and the NeoClient). He loads the PHP libraries up via Composer and injects the NeoClient instance into the application. He includes the view and controller handling for each of the pages:

  • a main all user list
  • showing who a user follows
  • listing suggested users (who to follow)
  • adding a relationship

Screenshots are also included to show the example output along with all the code you'll need.

tagged: tutorial series part2 social feature neo4j neoclient

Link: http://www.sitepoint.com/adding-social-network-features-php-app-neo4j/

Sherif Ramadan:
A Software Engineer's Job
Aug 05, 2014 @ 16:07:54

Sherif Ramadan has a new post to his site today that tries to answer the question "what does a software developer really do?"

As a software engineer I have to learn to see things differently, because my job requires that I solve problems. Though not only is it important that I come up with a solution, but equally important that I can express the solution in code. [...] It is equally important to recognize that not all problems have technical solutions. Some problems are better solved by social solutions.

He talks about the influence that some of the major services have had on the social aspects of our lives and how they're mostly a "convenience to mankind". He suggests that the job of a software engineer has multiple aspects, and not just technical ones. They're required to see things differently, be able to understand the problem well and express the solution in a clear and practical set of code.

The engineer must figure out which problems are worth solving through technology, in order to save people time and money, and defer those which do not to more social means. Let humans do what they do best and computers do what they do best.
tagged: software engineer job opinion technology social

Link: http://sheriframadan.com/2014/08/a-software-engineers-job/

SitePoint PHP Blog:
Social Network Authentication: Twitter and Facebook
Jul 21, 2014 @ 16:32:12

The SitePoint PHP blog continues their series of tutorials showing how to authentication your users against various social networks. In the previous post they covered connecting to Google+ and in this latest post they move on to two other popular social networks: Facebook and Twitter.

In the previous parts of this series, we created our initial interfaces, set up our Google+ login functionality and talked about how we can merge our accounts together. In this article, we will integrate Twitter and Facebook within our application. You will see a lot of similarities with the Google+ article, so if you could follow that one easily, you won’t have much trouble with this one. If you haven’t read that article yet, I suggest you read it first before continuing this article.

He starts off with the Twitter authentication, creating a new "SocialLogin" object type for it and defining the three required properties it needs to connect. Code is included to make the OAuth connection, pass along the callback URL and forward on the user to the Twitter site for approval. Code is also included to store the data about the Twitter user in your application. Next up is Facebook. The connection is very similar to the others with only a slight difference in the data that's required. You can find the full code for the tutorial so far in this Github repository.

tagged: social network authentication tutorial series twitter facebook

Link: http://www.sitepoint.com/social-network-authentication-twitter-facebook/


Trending Topics: