all repos — keyring-reactions-importer @ 0941b04d027a39e1a50ed83e4318f1106d248147

fixing our beloved facebook
Peter Molnar hello@petermolnar.eu
Sun, 24 May 2015 17:51:13 +0100
commit

0941b04d027a39e1a50ed83e4318f1106d248147

parent

29e6660b2babd8475924f5f7179a1d375818982b

1 files changed, 7 insertions(+), 5 deletions(-)

jump to
M importers/keyring-reactions-facebook.phpimporters/keyring-reactions-facebook.php

@@ -56,16 +56,18 @@ 'keyring-facebook-reactions-missing-func',

sprintf(__( 'Function is missing for this method (%s), cannot proceed!', 'keyring'), $method) ); - return $this->$func ( $post_id, $silo_id ); + $user_id = $this->service->token->meta['user_id']; + + return $this->$func ( $post_id, $silo_id, $user_id ); } /** * FAVS */ - function get_likes ( $post_id, $silo_id ) { + function get_likes ( $post_id, $silo_id, $user_id ) { $res = array(); - $baseurl = sprintf( "https://graph.facebook.com/v%s/%s/likes?", static::GRAPHAPI, $silo_id ); + $baseurl = sprintf( "https://graph.facebook.com/v%s/%s_%s/likes?", static::GRAPHAPI, $user_id, $silo_id ); $params = array( 'access_token' => $this->service->token->token,

@@ -110,9 +112,9 @@ /**

* comments */ - function get_comments ( $post_id, $silo_id ) { + function get_comments ( $post_id, $silo_id, $user_id ) { $res = array(); - $baseurl = sprintf( "https://graph.facebook.com/v%s/%s/comments?", static::GRAPHAPI, $silo_id ); + $baseurl = sprintf( "https://graph.facebook.com/v%s/%s_%s/comments?", static::GRAPHAPI, $user_id, $silo_id ); $params = array( 'access_token' => $this->service->token->token,