WordPress.org

Ready to get started?Download WordPress

Forums

BuddyPress Activity Plus
[resolved] Embed Facebook Videos? (2 posts)

  1. palmdoc
    Member
    Posted 2 months ago #

    Is it possible to embed Facebook videos as well?
    Hasn't worked for me and I also have Embedly installed

    https://wordpress.org/plugins/buddypress-activity-plus/

  2. WPMU DEV
    Member
    Posted 2 months ago #

    Hi @palmdoc,

    I hope you are well today and thank you for your question.

    Unfortunately currently the BuddyPress Activity Plus plugin doesn't support embedding Facebook videos but you can embed it in your BuddyPress Activity by adding following code in the functions.php file of your child theme.

    add_filter( 'bp_activity_allowed_tags', 'allow_iframe');
    function allow_iframe( $activity_allowedtags ) {
    	$activity_allowedtags['iframe'] = array(
    		'src' => array (),
    		'width' => array (),
    		'height' => array (),
    		'frameborder' => array ()
    	);
    	$activity_allowedtags['object'] = array(
    		'width' => array (),
    		'height' => array ()
    	);
    	$activity_allowedtags['param'] = array(
    		'name' => array (),
    		'value' => array ()
    	);
    	$activity_allowedtags['embed'] = array(
    		'src' => array (),
    		'type' => array (),
    		'width' => array (),
    		'height' => array (),
    		'allowscriptaccess' => array (),
    		'allowfullscreen' => array ()
    	);
    	return $activity_allowedtags;
    }

    After adding the above code just add the Facebook video in the BuddyPress Activity using any of the following HTML markup and replacing Facebook video id with the appropriate video id that you want to use.

    <iframe src="http://www.facebook.com/video/embed?video_id=679281632133433" width="540"″ height="420"″ frameborder="0"″></iframe>

    or

    <object width="400" height="224" >
     <param name="allowfullscreen" value="true" />
     <param name="allowscriptaccess" value="always" />
     <param name="movie" value="http://www.facebook.com/v/679281632133433" />
     <embed src="http://www.facebook.com/v/679281632133433" type="application/x-shockwave-flash"
       allowscriptaccess="always" allowfullscreen="true" width="400" height="224">
     </embed>
    </object>

    For more information about how to obtain Facebook video id or video code refer the following pages.

    http://blogtimenow.com/how-to/embed-facebook-videos-website/
    http://www.labnol.org/internet/embed-facebook-videos-in-web-pages/9715/
    http://www.efrennolasco.com/how-to-embed-facebook-video/

    Best Regards,
    WPMU DEV

Reply

You must log in to post.

About this Plugin

About this Topic