diff options
author | Craig Andrews <candrews@integralblue.com> | 2009-08-26 22:09:46 -0400 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2009-08-26 22:09:46 -0400 |
commit | eb667d09d9c6ef5a1465a5f8d824661a9387a4da (patch) | |
tree | 0e14168848a47adaeeda98ff286ae8da9c194182 | |
parent | 3e362233ee2f7acd676c0ee86025d7511f265b7e (diff) |
allow oEmbed resources to be facebook attachments
-rw-r--r-- | lib/facebookutil.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/facebookutil.php b/lib/facebookutil.php index 67c6ecbdf..fc68f2b29 100644 --- a/lib/facebookutil.php +++ b/lib/facebookutil.php @@ -109,7 +109,6 @@ function facebookBroadcastNotice($notice) $can_update = $facebook->api_client->users_hasAppPermission('status_update', $fbuid); - if (!empty($attachments) && $can_publish == 1) { $fbattachment = format_attachments($attachments); $facebook->api_client->stream_publish($status, $fbattachment, @@ -180,7 +179,11 @@ function format_attachments($attachments) foreach($attachments as $attachment) { - $fbmedia = get_fbmedia_for_attachment($attachment); + if($enclosure = $attachment->getEnclosure()){ + $fbmedia = get_fbmedia_for_attachment($enclosure); + }else{ + $fbmedia = get_fbmedia_for_attachment($attachment); + } if($fbmedia){ $fbattachment['media'][]=$fbmedia; }else{ |