Open leonatkinson opened 11 years ago
Perhaps the code should change to use
"post_text"=>self::getBestPostText($p),
...
private static function getBestPostText($post) {
$post_text = '';
if(isset($post->message)) {
$post_text = $post->message;
}
if(!$post_text && isset($post->name)) {
$post_text = $post->name;
}
if(!$post_text && isset($post->description)) {
$post_text = $post->description;
}
if(!$post_text && isset($post->story)) {
$post_text = $post->story;
}
return $post_text;
}
It looks like issue #877 updated logic so that if a FB post had no "message" property, it used "name" instead. Looking at what's in the code now, though, that change has reverted. I'm looking at line 290 in class.FacebookCrawler.php:
I have many posts created by dlvr.it that seem to match the pattern: no message property but name and description properties. Here's what the JSON for the post looks like:
These posts with no text represent about 39% of my FB posts. Having name or description in there for the post_text will make the reports more readable. Thanks!