git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 8b8450f9 authored by Brion Vibber's avatar Brion Vibber

Add helper metadata on individual notice pages to aid sharing to Facebook (use...

Add helper metadata on individual notice pages to aid sharing to Facebook (use poster's avatar as image, indicate the text content)
parent d8df140e
......@@ -298,6 +298,16 @@ class ShownoticeAction extends OwnerDesignAction
array(),
array('format'=>'xml','url'=>$this->notice->uri)),
'title'=>'oEmbed'),null);
// Extras to aid in sharing notices to Facebook
$avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE);
$avatarUrl = ($avatar) ?
$avatar->displayUrl() :
Avatar::defaultImage($avatar_size);
$this->element('meta', array('property' => 'og:image',
'content' => $avatarUrl));
$this->element('meta', array('property' => 'og:description',
'content' => $this->notice->content));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment