// message, picture, link, name, caption, description, source, place, tags
$postvars = array(
'access_token' => $fb_token,
// message, picture, link, name, caption, description, source, place, tags
$postvars = array(
'access_token' => $fb_token,
if ((stristr($link,'youtube')) || (stristr($link,'youtu.be')) || (stristr($link,'vimeo'))) {
if ((stristr($link,'youtube')) || (stristr($link,'youtu.be')) || (stristr($link,'vimeo'))) {
+ } else if (($video != "")) {
+ // If it is a link to a video then post it as a link
+ $postvars = array(
+ 'access_token' => $fb_token,
+ 'link' => $video,
+ );
+ if ($msg != $video)
+ $postvars['message'] = $msg;
+
+ $url = 'https://graph.facebook.com/'.$target.'/links';
} else if (($link == "") and ($image != "")) {
// If it is only an image without a page link then post this image as a photo
$postvars = array(
} else if (($link == "") and ($image != "")) {
// If it is only an image without a page link then post this image as a photo
$postvars = array(