How to "embed" YouTube videos when publishing to Fan Page Wall
I'm working on a c# serv开发者_开发问答ice that publishes updates to a Fan Page using the c# SDK. I have it publishing updates just fine, but some of these are YouTube videos that when publish "manually" would be "embedded" and viewable on the Fan Page itself.
The main part is very straightfoward code that I found here at Stackoverflow:
dynamic messagePost = new System.Dynamic.ExpandoObject();
messagePost.access_token = [access_token];
messagePost.picture = "http://img.youtube.com/vi/abc123/default.jpg";
messagePost.link = "http://www.youtube.com/watch?v=abc123";
messagePost.name = "Test Name";
messagePost.caption = "{*actor*} " + "This is just a test...";
messagePost.description = "This is a test post description.";
All works fine except it is a link to the video instead of it being "embedded". Any guidance? I've searched for several hours now, tried different combinations, all to no avail.
Thanks!
Just goes to show that when the question seems simple, it probably is. So, in case someone else ever needs the answer to this one, I found it once I resumed searching.
Only use the .link and .name attributes. If you don't fill the remainder then the video appears "inline" on FB.
Great resource, sorry to have posted too early.
精彩评论