5

Specifically what I'm looking for is the embedded video player functionality you would receive if you had just manually shared a YouTube video but done programmatically through the Graph API.

Eric Clifford
  • 223
  • 3
  • 8

3 Answers3

2

It appears that you have to extract the URLs of the actual swf in the page and the thumbnail image yourself.

For example, this seems to work:

curl -F 'access_token=...' \
     -F 'message=Link to YouTube' \
     -F 'link=http://www.youtube.com/watch?v=3aICB2mUu2k' \
     -F 'source=http://www.youtube.com/v/3aICB2mUu2k' \
     -F 'picture=http://img.youtube.com/vi/3aICB2mUu2k/0.jpg' \
     https://graph.facebook.com/me/feed

See source: Posting an embedded video link using the Facebook Graph API

Community
  • 1
  • 1
Somnath Muluk
  • 55,015
  • 38
  • 216
  • 226
0

You can either use the old REST API or the new Graph API. In either case you must have the publish_stream permission.

If you want to use the Graph API you need to create a Post object and then post it to the graph feed url for that profile

graph.facebook.com/PROFILE_ID/feed

You will want to set the source property in the Post object to the youTube url for the video.

http://developers.facebook.com/docs/reference/api/post/

If you want to use the older REST API the process is similar but you post to

api-video.facebook.com/restserver.php

Justin Ohms
  • 3,334
  • 31
  • 45
-1

Facebook does not allow youtube to play video on facebook anymore but direct them to youtube website to watch.

matrix4583
  • 31
  • 7