PHP code example of anahkiasen / flickering

1. Go to this page and download the library: Download anahkiasen/flickering library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

anahkiasen / flickering example snippets


'Flickering\FlickeringServiceProvider',

 'Flickering' => 'Flickering\Facades\Flickering',
 

$flickering = App::make('flickering');
$flickering->handshake($apiKey, $apiSecret);

Flickering::handshake($apiKey, $apiSecret)
Flickering::handshake();    //Using the config file

Flickering::callMethod('people.getPhotos', array('user_id' => '31667913@N06'));

Flickering::peopleGetPhotos('31667913@N06')

$method = Flickering::peopleGetPhotos('31667913@N06')

$method->setParameter('per_page', 25) // or
$method->setPerPage(25)

$method->getPerPage() // 25

$method = Flickering::callMethod('people.getPhotos', array('user_id' => '31667913@N06'))
$results = $method->getResults('photos')

// Same thing
$results = Flickering::getResultsOf('people.getPhotos', array('user_id' => '31667913@N06'))

Route::get('flickr/auth', function() {
    Flickering::handshake();
    return Flickering::getOpauth();
});
Route::any('flickr/oauth_callback', function() {
    Flickering::handshake();
    if(Request::getMethod() == 'POST'){
        Flickering::getOpauthCallback();
        return 'Authenticated!';
    }else{
        Flickering::getOpauth();
        return 'Being redirected..';
    }
});

Flickering::handshake();
$user = Flickering::getUser();

// Get OAuth token
$user->getKey()

// Get Flickr's UID of the person
$user->getUid()

// Get an array of basic informations on the person
$user->getInformations()

// Get the whole schebang : photos, photosets, friends, and other informations made public by the user
$user->getPerson()