Plugin Directory

Changeset 1167594


Ignore:
Timestamp:
05/26/2015 09:36:02 AM (11 years ago)
Author:
cadeyrn
Message:

version 1.1

Location:
keyring-reactions-importer
Files:
4 edited
4 copied

Legend:

Unmodified
Added
Removed
  • keyring-reactions-importer/tags/1.1/importers/keyring-reactions-facebook.php

    r1152502 r1167594  
    5757            );
    5858
    59         return $this->$func ( $post_id, $silo_id );
     59        $user_id = $this->service->token->meta['user_id'];
     60
     61        return $this->$func ( $post_id, $silo_id, $user_id );
    6062    }
    6163
     
    6466     */
    6567
    66     function get_likes ( $post_id, $silo_id ) {
     68    function get_likes ( $post_id, $silo_id, $user_id ) {
    6769        $res = array();
    68         $baseurl = sprintf( "https://graph.facebook.com/v%s/%s/likes?", static::GRAPHAPI, $silo_id );
     70        $baseurl = sprintf( "https://graph.facebook.com/v%s/%s_%s/likes?", static::GRAPHAPI, $user_id, $silo_id );
    6971
    7072        $params = array(
     
    111113     */
    112114
    113     function get_comments ( $post_id, $silo_id ) {
     115    function get_comments ( $post_id, $silo_id, $user_id ) {
    114116        $res = array();
    115         $baseurl = sprintf( "https://graph.facebook.com/v%s/%s/comments?", static::GRAPHAPI, $silo_id );
     117        $baseurl = sprintf( "https://graph.facebook.com/v%s/%s_%s/comments?", static::GRAPHAPI, $user_id, $silo_id );
    116118
    117119        $params = array(
  • keyring-reactions-importer/tags/1.1/keyring-reactions-importer.php

    r1152502 r1167594  
    44Plugin URI: https://github.com/petermolnar/keyring-reactions-importer
    55Description: A recations (comments, favs, etc. ) importer based on Keyring
    6 Version: 1.0
     6Version: 1.1
    77Author: Peter Molnar <[email protected]>
    88Author URI: http://petermolnar.eu/
     
    9999        add_action( 'keyring_connection_verified', array( &$this, 'verified_connection' ), 10, 2 );
    100100
    101         add_action( 'add_meta_boxes', array(&$this, 'add_post_meta_box' ));
    102         add_action( 'save_post', array(&$this, 'handle_post_meta_box' ) );
     101        //add_action( 'add_meta_boxes', array(&$this, 'add_post_meta_box' ));
     102        //add_action( 'save_post', array(&$this, 'handle_post_meta_box' ) );
    103103
    104104        // additional comment types
     
    791791    function display_post_meta_box() {
    792792        wp_nonce_field( basename( __FILE__ ), static::SILONAME );
     793        global $post;
    793794        ?>
    794795        <p>
    795796            <?php
    796                 printf ( '<input style="margin-right: 1em;" class="button button-primary " "id="import-%s" name="import-%s" type="submit" value="Import"></input>', static::SLUG, static::SLUG, static::SLUG, static::SLUG );
     797                printf ( '<input style="margin-right: 1em;" class="button button-primary " "id="import-%s" name="import-%s" type="submit" value="Import for #%s"></input>', static::SLUG, static::SLUG, $post->ID );
    797798                printf ('<label for="import-%s">%s</label><br />', static::SLUG, sprintf(__('Manually import reactions from %s for this post now'), static::SILONAME ));
    798799            ?>
     
    817818
    818819        if (isset( $_POST['import-' . static::SLUG ] )) {
    819             die ('eddig ok');
    820             $this->do_single_import( $post_id );
     820            $id = split('#', $_POST['import-' . static::SLUG ]);
     821            $id = $id[1];
     822            $this->do_single_import( $id );
    821823        }
    822824
  • keyring-reactions-importer/tags/1.1/readme.txt

    r1152502 r1167594  
    44Requires at least: 3.0
    55Tested up to: 4.2.1
    6 Stable tag: 1.0
     6Stable tag: 1.1
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5454== Changelog ==
    5555
     56= 1.1 =
     57*2015-05-26*
     58
     59* Facebook broke it's API... again. Fixed.
     60
     61
    5662= 1.0 =
    5763*2015-05-01*
  • keyring-reactions-importer/trunk/importers/keyring-reactions-facebook.php

    r1152502 r1167594  
    5757            );
    5858
    59         return $this->$func ( $post_id, $silo_id );
     59        $user_id = $this->service->token->meta['user_id'];
     60
     61        return $this->$func ( $post_id, $silo_id, $user_id );
    6062    }
    6163
     
    6466     */
    6567
    66     function get_likes ( $post_id, $silo_id ) {
     68    function get_likes ( $post_id, $silo_id, $user_id ) {
    6769        $res = array();
    68         $baseurl = sprintf( "https://graph.facebook.com/v%s/%s/likes?", static::GRAPHAPI, $silo_id );
     70        $baseurl = sprintf( "https://graph.facebook.com/v%s/%s_%s/likes?", static::GRAPHAPI, $user_id, $silo_id );
    6971
    7072        $params = array(
     
    111113     */
    112114
    113     function get_comments ( $post_id, $silo_id ) {
     115    function get_comments ( $post_id, $silo_id, $user_id ) {
    114116        $res = array();
    115         $baseurl = sprintf( "https://graph.facebook.com/v%s/%s/comments?", static::GRAPHAPI, $silo_id );
     117        $baseurl = sprintf( "https://graph.facebook.com/v%s/%s_%s/comments?", static::GRAPHAPI, $user_id, $silo_id );
    116118
    117119        $params = array(
  • keyring-reactions-importer/trunk/keyring-reactions-importer.php

    r1152502 r1167594  
    44Plugin URI: https://github.com/petermolnar/keyring-reactions-importer
    55Description: A recations (comments, favs, etc. ) importer based on Keyring
    6 Version: 1.0
     6Version: 1.1
    77Author: Peter Molnar <[email protected]>
    88Author URI: http://petermolnar.eu/
     
    9999        add_action( 'keyring_connection_verified', array( &$this, 'verified_connection' ), 10, 2 );
    100100
    101         add_action( 'add_meta_boxes', array(&$this, 'add_post_meta_box' ));
    102         add_action( 'save_post', array(&$this, 'handle_post_meta_box' ) );
     101        //add_action( 'add_meta_boxes', array(&$this, 'add_post_meta_box' ));
     102        //add_action( 'save_post', array(&$this, 'handle_post_meta_box' ) );
    103103
    104104        // additional comment types
     
    791791    function display_post_meta_box() {
    792792        wp_nonce_field( basename( __FILE__ ), static::SILONAME );
     793        global $post;
    793794        ?>
    794795        <p>
    795796            <?php
    796                 printf ( '<input style="margin-right: 1em;" class="button button-primary " "id="import-%s" name="import-%s" type="submit" value="Import"></input>', static::SLUG, static::SLUG, static::SLUG, static::SLUG );
     797                printf ( '<input style="margin-right: 1em;" class="button button-primary " "id="import-%s" name="import-%s" type="submit" value="Import for #%s"></input>', static::SLUG, static::SLUG, $post->ID );
    797798                printf ('<label for="import-%s">%s</label><br />', static::SLUG, sprintf(__('Manually import reactions from %s for this post now'), static::SILONAME ));
    798799            ?>
     
    817818
    818819        if (isset( $_POST['import-' . static::SLUG ] )) {
    819             die ('eddig ok');
    820             $this->do_single_import( $post_id );
     820            $id = split('#', $_POST['import-' . static::SLUG ]);
     821            $id = $id[1];
     822            $this->do_single_import( $id );
    821823        }
    822824
  • keyring-reactions-importer/trunk/readme.txt

    r1152502 r1167594  
    44Requires at least: 3.0
    55Tested up to: 4.2.1
    6 Stable tag: 1.0
     6Stable tag: 1.1
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5454== Changelog ==
    5555
     56= 1.1 =
     57*2015-05-26*
     58
     59* Facebook broke it's API... again. Fixed.
     60
     61
    5662= 1.0 =
    5763*2015-05-01*
Note: See TracChangeset for help on using the changeset viewer.