Support » Plugin: Simple Facebook Connect » Youtube Thumbnails

  • Resolved Aakash83


    I have a question about the auto publish to facebook feature. by default this plugin looks for any embeded videos and automatically generate thumbs for that video . In my theme I have a custom field “video” which contains the Youtube URL of video. Now what I want is to make some change in the code in the “simple-facebook-connect/sfc-publish.php” File so that it take the youtube URL from the custom Field ” Video” and generate thumbnails so that this thumbnail can be used when the plugin publsih this post to facebook.

    I tried this code but it is not working. In my theme I am generating thumbs using the same method.

    $youtubeid = get_post_meta($post->ID, "video", true);
    $url = parse_url($youtubeid);
    array_unshift($images, "$v/1.jpg");


Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Samuel Wood (Otto)

    (@otto42) Admin

    The code to find videos in the post is in the sfc-base.php file. You can modify the function sfc_base_find_video($post) to find the relevant video files for your setup.

    I recommend doing this here instead of elsewhere because this also affects the meta information put into the single post headers, which affects what happens with like/share and other things. Putting code like this in publish would only change one aspect of this.

    Thanks for your reply. but the queation is that how can we modify the code so that It can search a Youtube URL from a custom field and generate its thumbnail while autoposting to facebook. i.e I want the plugin to pick the video URL from custom field and not the main post content. can you please guide I am not very good with PHP .


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Youtube Thumbnails’ is closed to new replies.