Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

flattr/php-flattr-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample code to use the Flattr v2 web API

to get up and running:

the oauth2client uses httpconnection and httpresponse which wrapps the curl php bindings.

if you are using a server with apt you can install it by

apt-get install php5-curl

public api call

$client = new OAuth2Client(array('base_url' => 'https://api.flattr.com/rest/v2'));
$thing = $client->getParsed('/things/423405/');
var_dump($thing); // array

minimal sample code

create an API key at https://flattr.com/apps make sure you add a correct callback_url it should be something like http://url-to-your-vhost/callback.php
Copy /config.template.php to /config.php and enter your api credentials.
Point a apache/lighttpd/nginx vhost to the minimal/ directory and restart.
Open http://url-to-your-vhost

connect with flattr sample

sample app that implements a connect with flattr (based on sessions, no database, using coltrane framework)

see connect_with_flattr/


Documentation at http://developers.flattr.net/
Questions: StackOverflow
Feedback: twitter

About

Minimal example of how to use the flattr v2 oauth2 api using php

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages