Compartir diferentes proveedores de videos en Facebook usando Wordpress

I want to be able to share videos from my Wordpress site to Facebook using different video providers. I was able to use my own video player, but I'm not ready to post videos using my server and I prefer to have users post using a provider like youtube, vimeo, facebook, ect.... Right now my site has those kind of video players. I edit the meta tags several times, this is the one I currently have:

    <meta name=”medium” content=”medium_type” /> 
<meta property="og:title" content="<?php the_title(); ?>" /> 
<meta name="description" content="<?php echo string_limit_words(get_the_excerpt(), 25); ?>" /> 
<meta property="og:type" content="article" /> 
<meta property="og:url" content="<?php the_permalink(); ?>" /> 
<meta property="og:image" content="" /> 
<meta property="og:site_name" content="<?php bloginfo('name'); ?>" /> 
<meta property="fb:app_id" content="145902762138730" /> 
<meta property="video_type" content="application/x-shockwave-flash" /> 
<meta property="video_height" content="360" /> 
<meta property="video_width" content="640" /> 

   <link rel="image_src" href="<?php echo $wpc_image_url[0] ?>"; } ?>" /> 

<link rel="videothumbnail" href="<?php if( ( $video_thumbnail = get_video_thumbnail() ) != null ) { echo "<img src='".$video_thumbnail."' />"; } ?>" /> 

  <link rel="video_src" href="<?php get_post_meta($post->ID, 'videosource', true); ?>" /> <!-- THIS IS A CUSTOM POST WITH LINK OF SOURCE LIKE YOUTUBE OR VIMEO, BUT IS NOT MAKING IT SHOW UP ON MY WALL --> 

I also tested it using a single youtube video and it worked fine. But since I have other videos beside youtube I can't do it where it just gets a youtube id. Yesterday the posts without videos were showing up, but now when all posts gets share it shows up like if it was a video on my wall, so if clicked it will give an error. I been pulling my hair all week with this and still couldn't get it to work. Can anybody point me out the problem, or tell me how I should do it. I search everywhere but they just explain the same thing, basically for one player. I'll appreciate it if you can help me out here.

Another thing is... when I update my script, it takes so long for facebook to update the change. I have to wait for so long in order to test it again, like if facebook is holding it in cache for too long, is there a way to bypass that?

preguntado el 28 de agosto de 11 a las 00:08

hello - currently having loads of problems trying to share videos. Do i need to create an App for this? Not sure where people are getting a value for fb:app_id from? Dc -

1 Respuestas

To have a video display, use the og:video meta tag instead of the <link rel"video_src" /> code you are using now. The value of the og:video tag should be a .swf file (or a youtube link which will get automatically converted). You can see the open graph meta tags needed for video aquí.

You can get the cache updated by using the URL Linter Debugger tool.

Respondido 28 ago 11, 05:08

Thanks for clearing that out, at-least now i now about the URL Linter Debugger. I had tested the og:video before and it worked but since I wanted to be able to have different videos players I might have to do a few if statements and just call the id where it belongs :\ because i thought og:video was only for swf , thats the reason I used link rel"video_src" instead. Atleast I'm not getting error, i see it loading the swf but nothing shows, just plain white. I should be able figure it out. I also figure how to call the video thumbnail with just calling video_thumbnail(); i was doing it wrong. - Alex Peña

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.