scratch
/graph.php |
@@ -66,19 +66,25 @@ |
|
list($width, $height) = getimagesize($userPath); |
|
# Create an OpenGraph object with validation. |
$og = new OpenGraph(); |
$imagePath = $config['URL_PATH'].$_GET['hash']; |
|
$og->title('Scratch Copy') |
->description('Asset Sharing') |
->url($config['URL_PATH'].$_GET['hash']) |
->type('movie') |
->image($config['URL_PATH'].$_GET['hash'], [ |
type => 'image/png', |
width => $width, |
height => $height |
]); |
echo <<<END |
<html> |
<head> |
<meta property="og:site_name" content="Scratch Copy"> |
<meta property="og:url" content="$imagePath"> |
<meta property="og:title" content="Scratch Copy"> |
<meta property="og:type" content="video.other"> |
<meta property="og:image" content="$imagePath"> |
<meta property="og:image:width" content="$width"> |
<meta property="og:image:height" content="$height"> |
</head> |
|
|
echo $og->renderTags(); |
<body> |
<p> |
<img src="$imagePath"> |
</p> |
</body> |
|
</html> |
END; |