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

SitePoint PHP Blog:
Commenting, Upvoting and Uploading Photos with the 500px API
Mar 10, 2015 @ 16:55:46

The SitePoint PHP blog continues their series creating a simple application based on the 500px service with part two, commenting, upvoting and uploading photos. The 500px service is a photo community for discovering, sharing, buying and selling inspiring photography powered by creative people worldwide.

In the first part of this series we used the API to get the latest photos from 500px and filter through them, and we built a user profile with the list of associated photos. In this part, we are going to give the user the ability to vote, favorite and comment on photos, and finally, we will give the users the ability to upload their own photos.

They start with a look at authentication and authorization handling to make the OAuth-based request to the 500px API. Code is included for the connecting class, including the addition of a logger to make debugging the requests simpler. From there they set up the routes for handling votes on photos (PHP and Javascript) and marking favorite photos. They also include the functionality for adding comments, getting the latest comments and uploading new photos to the service. The final resulting code can be found over on GitHub.

tagged: 500px tutorial api series part2 comment upvote upload photos

Link: http://www.sitepoint.com/commenting-upvoting-uploading-photos-500px-api/

SitePoint PHP Blog:
Popular Photos, Filters and User Profiles with the 500px API
Mar 05, 2015 @ 17:26:50

The SitePoint PHP blog has started off a new series this morning to help you create a custom Laravel application based on the 500px photo community site. In this first part of the series they help you get the application up and running and connected to the 500px API.

500px is a photo community for discovering, sharing, buying and selling inspiring photography. In this article we are going to explore their API and build a small showcase app. Let’s get started.

You'll need to have Laravel set up and working to get started on the tutorial, but they help you get the other libraries installed and configured (like Guzzle). They start with getting a list of the most popular photos from the API, connecting it to your account via an OAuth token. A base route is created and connected to a controller/action with a view to render each of the photos in their own divs. They then add in a bit of Javascript to create a "Load More" button that makes another call, with pagination, to pull in more photo details. Finally they show you how to create the user profile page, grabbing user information and related photos and rendering them out to a page.

tagged: 500px tutorial series part1 laravel api oauth photos filters profiles

Link: http://www.sitepoint.com/popular-photos-filters-user-profiles-500px-api/


Trending Topics: