Changeset 96303 in spip-zone


Ignore:
Timestamp:
Mar 29, 2016, 8:50:45 AM (5 years ago)
Author:
p@…
Message:

Encore un token à récupérer correctement

File:
1 edited

Legend:

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

    r96299 r96303  
    5050 */
    5151function facebook_poster_lien_page($id_page, $lien, $message) {
    52 
    53         include_spip('inc/config');
    54         $config = lire_config('facebook');
     52        include_spip('inc/token');
     53        $token = connecteur_get_token(0, 'facebook');
    5554
    5655        $fb = facebook();
     
    6362        try {
    6463                // Returns a `Facebook\FacebookResponse` object
    65                 $response = $fb->post('/'.$id_page.'/feed', $linkData, facebook_page_token($id_page));
     64                $response = $fb->post('/'.$id_page.'/feed', $linkData, $token);
    6665        } catch (Facebook\Exceptions\FacebookResponseException $e) {
    6766                return 'Graph returned an error: ' . $e->getMessage();
Note: See TracChangeset for help on using the changeset viewer.