views:

2869

answers:

5

Hi guys -

[I've answered my own question below - The fourth answer. One of the previous answers had a good hint in it - but not enough for the solution].

Has anyone posted a video via the Facebook Connect API to their profile / feed page?

Ideally, the video should be queued to the first frame with the superimposed Facebook's blue right arrow "play" button. Or if a thumbnail representing the video has to also be uploaded (rather than the video being queued to the first frame) as well, this is fine.

Also, when the video, or thumbnail, on the profile page is clicked, the video plays where it is - rather than going to another page off Facebook to be played there.

Thanks guys, ~Aki

A: 

Have you read the Facebook developer wiki page on this? That explains what is possible and how, it's pretty decent.

stevedbrown
A: 

I don't think stevedbrown answered your whole question - I would try using the calls in that page, but using the application's ID as the user ID when you upload.

Mike Heinz
Thanks Mike. We're trying to use Facebook's Share functionality (http://www.facebook.com/share_partners.php). Longer term, yes, we will be writing a true Facebook app using the Connect API - but we just wanted to post something in a hurry, using Share. Posting works - but, when it's a video, the video does not play embedded in the Facebook profile feed (as it does when you share a video from YouTube, or Hulu, for example). The user experience you see on Facebook when you post / share a YouTube video, is exactly what we would like to have.
Aki Iskandar
+1  A: 

Use the Video.upload as described by stevedbrown or the Stream API or if you want to go simple share the link via API or share link.

Andreas Klinger
Thanks Andreas. For the short term, we're trying to stay clear of using Facebook API's such as Video.upload, or even their new Connect API / platform. Using the share link is EXACTLY what we are trying to do - but we're having issues. We've read Facebook's partner share page: facebook.com/share_partners.php, and it seems straight forward enough. We have all the meta and link tags they require for a video, but there are two issues we can't seem to resolve:1 - the video does not play embedded (your taken to an external page)2 - the white/blue play arrow is not there Any ideas? .
Aki Iskandar
shared pages (including a videoplayer) only show your videoplayer in the stream if your domain is whitelisted by facebook (hit support up for that). otherwise try to share the flv file in video_src
Andreas Klinger
You are correct. The domain name has to be whitelisted by facebook. Also, the real issue was the documentation on the page http://www.facebook.com/share_partners.php ... there was a tag ommission. I will post an answer (using the "Answer Your Question" button) this for other people that may be going through the same issue.
Aki Iskandar
A: 

The question may have not been correctly worded. The term "API" was misleading to a couple of folks - and I apologize for that.

What I was trying to do was to "share" a video by linking it in Facebook, AND to have it play in the profile feed (ie. to not leave the Facebook site while viewing the video - just like YouTube and Hulu.com do).

After digging into the JavaScript that Hulu was using to get this behavior, we noticed that a link tag was missing between our version of the < meta > and < link > tags, and Hulu's.

Facebook's web page, http://www.facebook.com/share_partners.php, was missing a tag that you should have if the content is a video, and you want it played in the profile feed.

Along with: < link rel="video_src" href="http://www.example.com/player.swf?video_id=123456789"/ > ...

You should include: < link rel="media:video" href="http://www.example.com/player.swf?video_id=123456789"/ >

That will get it to play in the feed. BUT, your domain name must be whitelisted.

To get your domain whitelisted, fill out this form: http://www.facebook.com/share_partners.php#/developers/developer_help.php

I got a reply, and approval, within a day! Kudos to the Facebook developer support staff!

Aki Iskandar
A: 

Thanks for the info here. A couple of questions:

This answer implies that the video_src tag is not absolutely required if your site is whitelisted? "shared pages (including a videoplayer) only show your videoplayer in the stream if your domain is whitelisted by facebook (hit support up for that). otherwise try to share the flv file in video_src"

The reason I ask is because I will likely not be able to include the video_src tag in what I'm doing, but still want to play the videos inline on facebook. The above comment also implies FLV files work, but I believe only SWF can be shared?

I also notice on the share_partners page that after the video_src tag there is an asterisk * but there is no associated text. Anyone know why? Is it a mistake, or is it supposed to have a note saying this tag is not required if whitelisted?

Cheers!! Dave

dave