When manually attaching a video link (from YouTube, Vimeo, etc) to a post using the Facebook web interface, Facebook automatically recognizes the link as a video, and allows the resulting status message to play the video inline. The video is displayed as an embedded player in the Wall or News feed.
Here's an example of what an embedded video looks like after posting manually.
When posting a link using the Graph API, the video is not embedded.
curl -F 'access_token=...' \
-F 'message=Link to YouTube' \
-F 'link=http://www.youtube.com/watch?v=3aICB2mUu2k' \
https://graph.facebook.com/me/feed
I suspect the answer is related to the source
argument, but I'm not sure what the URL should be there. Specifying the same URL just leads to a post with no thumbnail image whatsoever.
source: A URL to a Flash movie or video file to be embedded within the post. read_stream.
How can the same embedded behavior be accomplished by using the Graph API alone?
Here's how to post a video manually for YOUTUBE and VIMEO (hard to find online). Specifically if you want to have the LINK value pointing to a user's website/blog post where it originates.
Sharing using the API any .swf file or video wont show a thumbnail on facebook unless its youtube . And that is by design as per facebook. Check this link
https://developers.facebook.com/bugs/589975484398226?browse=external_tasks_search_results_526fc388b99e18881434478
It will not work for posting in GROUPS on /feeds or /links. See here. Please upvote the issue in order to be fixed sometime soon.
/links is a duplicate of the /feeds which only shows posts of type link posted by the user themselves.
Don't use /feed, use /links (https://graph.facebook.com/me/links/ ) and simply POST "message" and "link" parameters using the YouTube /watch?v=ZL7nV7WwJKg URL format. /feed never worked for me, it just posted a static graphic and link but I wanted it to actually play embedded on Facebook as it does when you share the Video from YouTube to Facebook. Works like a charm.
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:
It appears that you can generate a valid source and picture from the page URL. The URL looks like
http://www.youtube.com/watch?v=<code>
; take the code (3aICB2mUu2k here) and insert it into the URLshttp://www.youtube.com/e/<code>
for the source and andhttp://img.youtube.com/vi/<code>/0.jpg
for the picture.Instead try posting the link as the message attribute, it works for me that way.