Changeset 95005 in spip-zone


Ignore:
Timestamp:
Feb 7, 2016, 3:12:48 PM (3 years ago)
Author:
p@…
Message:

Pouvoir passer un token explicitement à la fonction facebook_profil

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/facebook/trunk/inc/facebook.php

    r95003 r95005  
    201201}
    202202
    203 function facebook_profil() {
    204         $fb = facebook();
    205 
    206         include_spip('inc/config');
    207         $config = lire_config('facebook');
    208 
     203function facebook_profil($token = null) {
     204
     205        $fb = facebook();
     206
     207        include_spip('inc/config');
     208        $config = lire_config('facebook');
     209
     210        if (empty($token)) {
     211                $token = $config['accessToken'];
     212        }
    209213        try {
    210214                // Returns a `Facebook\FacebookResponse` object
Note: See TracChangeset for help on using the changeset viewer.