Title: Please add missing elements from Facebook SDK
Last modified: August 31, 2016

---

# Please add missing elements from Facebook SDK

 *  [André B.](https://wordpress.org/support/users/sickmind/)
 * (@sickmind)
 * [10 years ago](https://wordpress.org/support/topic/please-add-missing-elements-from-facebook-sdk/)
 * Hi,
 * I´m adding custom video as Cover, and managed to do so, but only when I modify
   the plugin core class.
 * In class-instant-articles-post.php :
 * Missing:
 *     ```
       use Facebook\InstantArticles\Elements\Video;
       ```
   
 * In function to_instant_article() a simple check for Video could be added like
   this:
 *     ```
       $cover = $this->get_the_featured_image();
       		if ( $cover['src'] ) {
       			// Check if cover type is video / image
       			if ( $cover['type'] == 'video' ) {
       				$image = Video::create()->withURL( $cover['src'] );
       			} else {
       				$image = Image::create()->withURL( $cover['src'] );
       			}
       			if ( isset( $cover['caption'] ) && strlen( $cover['caption'] ) > 0 ) {
       				$image->withCaption(
       				    Caption::create()->withTitle( $cover['caption'] )
       				);
       			}
   
       			$header->withCover( $image );
       		}
       ```
   
 * Then its possible to modify the preferred output of video or image with a filter
   to hook into instant_articles_featured_image()
 * [https://wordpress.org/plugins/fb-instant-articles/](https://wordpress.org/plugins/fb-instant-articles/)

The topic ‘Please add missing elements from Facebook SDK’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/fb-instant-articles_8fa0a4.svg)
 * [Instant Articles for WP](https://wordpress.org/plugins/fb-instant-articles/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/fb-instant-articles/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/fb-instant-articles/)
 * [Active Topics](https://wordpress.org/support/plugin/fb-instant-articles/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/fb-instant-articles/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/fb-instant-articles/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [André B.](https://wordpress.org/support/users/sickmind/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/please-add-missing-elements-from-facebook-sdk/)
 * Status: not resolved