From 1222362ba0e441c0a63c27db7f257527bf643939 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 26 Apr 2011 16:37:26 -0700 Subject: [PATCH] better handling of FB like activity object --- addon/facebook/facebook.php | 12 +++++++++++- boot.php | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php index c48621e2c..e3b15c528 100644 --- a/addon/facebook/facebook.php +++ b/addon/facebook/facebook.php @@ -646,7 +646,17 @@ function fb_consume_stream($uid,$j,$wall = false) { $likedata['author-name'] = $likes->name; $likedata['author-link'] = 'http://facebook.com/profile.php?id=' . $likes->id; $likedata['author-avatar'] = 'https://graph.facebook.com/' . $likes->id . '/picture'; - $likedata['body'] = sprintf( t('%1$s likes %2$s\'s %3$s'), $likes->name, $orig_post['author-name'], t('post')); + + $author = '[url=' . $likedata['author-link'] . ']' . $likedata['author-name'] . '[/url]'; + $objauthor = '[url=' . $orig_post['author-link'] . ']' . $orig_post['author-name'] . '[/url]'; + $post_type = t('status'); + $plink = '[url=' . $orig_post['plink'] . ']' . $post_type . '[/url]'; + $likedata['object-type'] = ACTIVITY_OBJ_NOTE; + + $likedata['body'] = sprintf( t('%1$s likes %2$s\'s %3$s'), $author, $objauthor, $plink); + $likedata['object'] = '' . ACTIVITY_OBJ_NOTE . '1' . + '' . $orig_post['uri'] . '' . xmlify('') . '' . $orig_post['title'] . '' . $orig_post['body'] . ''; + $item = item_store($likedata); } } diff --git a/boot.php b/boot.php index b521735f8..ed68a11d3 100644 --- a/boot.php +++ b/boot.php @@ -2,7 +2,7 @@ set_time_limit(0); -define ( 'FRIENDIKA_VERSION', '2.1.960' ); +define ( 'FRIENDIKA_VERSION', '2.1.961' ); define ( 'DFRN_PROTOCOL_VERSION', '2.21' ); define ( 'DB_UPDATE_VERSION', 1053 );