Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 connect_with_flattr
Octocat-spinner-32 lib
Octocat-spinner-32 minimal
Octocat-spinner-32 .gitignore
Octocat-spinner-32 bootstrap.php
Octocat-spinner-32 config.template.php

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' => ''));
$thing = $client->getParsed('/things/423405/');
var_dump($thing); // array

minimal sample code

create an API key at 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
Questions: StackOverflow
Feedback: twitter

Something went wrong with that request. Please try again.