Committer: ailyin
LJSUP-6573 (Add ability to select pictures for Facebook publishing)U trunk/cgi-bin/LJ/Worker/Repost/CommentToFacebook.pm U trunk/cgi-bin/LJ/Worker/Repost/EntryToFacebook.pm
Modified: trunk/cgi-bin/LJ/Worker/Repost/CommentToFacebook.pm =================================================================== --- trunk/cgi-bin/LJ/Worker/Repost/CommentToFacebook.pm 2010-09-08 04:39:18 UTC (rev 9471) +++ trunk/cgi-bin/LJ/Worker/Repost/CommentToFacebook.pm 2010-09-08 07:20:49 UTC (rev 9472) @@ -39,7 +39,9 @@ my $body_raw = $comment->body_raw; - my $picture = $class->extract_first_picture_url($body_raw); + my $picture = $arg->{'thumbnail'} + || $class->extract_first_picture_url($body_raw); + $data->{'picture'} = $picture || ''; my $title = $class->cleanup($comment->subject_raw); Modified: trunk/cgi-bin/LJ/Worker/Repost/EntryToFacebook.pm =================================================================== --- trunk/cgi-bin/LJ/Worker/Repost/EntryToFacebook.pm 2010-09-08 04:39:18 UTC (rev 9471) +++ trunk/cgi-bin/LJ/Worker/Repost/EntryToFacebook.pm 2010-09-08 07:20:49 UTC (rev 9472) @@ -39,7 +39,9 @@ my $event_raw = $entry->event_raw; - my $picture = $class->extract_first_picture_url($event_raw); + my $picture = $arg->{'thumbnail'} + || $class->extract_first_picture_url($event_raw); + $data->{'picture'} = $picture || ''; my $title = $class->cleanup($entry->subject_raw);