Skip to content

An example Spark API application that shows the 10 most recently updated listings for a user. Includes the OAuth 2 flow prior to retrieving user data.

Notifications You must be signed in to change notification settings

wlmcewen/spark_15_minute_app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spark API 15 Minute Application

A simple "10 most recently updated listings" webapp built on Spark API. This project is intended for educational purposes, rather than production deployment.

Requirements

  • Basic understanding of PHP.
  • A web server that can run PHP scripts (e.g. Apache + mod_php)
  • A Spark API OAuth 2 key (get one here: http://sparkplatform.com/register/developers).
  • cURL for PHP (required by the sparkapi4p2 library).

This application uses sparkapi4p2, available here: https://github.com/sparkapi/sparkapi4p2 For simplicity, this API client is packaged in with the example application.

Configuration

In order for this example application to function, you'll need to supply your OAuth 2 Client Key, OAuth 2 Client Secret, and OAuth 2 Client Redirect URI in sparkle_functions.php:

$GLOBALS['client_id']     = "<YOUR OAUTH2 CLIENT KEY>";

$GLOBALS['client_secret'] = "<YOUR OAUTH2 CLIENT SECRET>";

$GLOBALS['redirect_uri']  = "<THE URL TO callback.php>";

From there, visit index.php on your web server to see the application in action.

About

An example Spark API application that shows the 10 most recently updated listings for a user. Includes the OAuth 2 flow prior to retrieving user data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 55.9%
  • PHP 44.1%