http://developers.facebook.com/docs/reference/dialogs/send/
可以由外部網站直接跳出送訊息的對話框,讓網友可以把資訊直接分享給朋友
實作範例教學:
<?php
$appid = '117616504920787';
$name = '這是測試';
$link = 'http://'.$server.'/test/?link=1';
$redir = 'http://'.$server.'/test/?link=2';
$to = '100000514502035';
$desc = '敘述';
$img = '圖片';
$dir = 'http://www.facebook.com/dialog/send?';
$dir .= 'app_id='.$appid;
$dir .= '&name='.urlencode($name);
$dir .= '&link='.urlencode($link);
$dir .= '&description='.urlencode($desc);
$dir .= '&picture='.urlencode($img);
$dir .= '&to='.urlencode($to);
$dir .= '&redirect_uri='.urlencode($redir);
header('Location: '.$dir); exit;
?>
沒有留言:
張貼留言