Skip to content
This repository

Video Upload 

nov edited this page · 3 revisions

Video Upload

You can upload videos to these type of walls.

  • User’s wall
  • Application’s wall
  • Page’s wall
  • Group’s wall
context = :application

subject = case context
when :me
  FbGraph::User.me(ACCESS_TOKEN)
when :application
  FbGraph::Application.new(APP_ID, :secret => APP_SECRET, :access_token => ACCESS_TOKEN)
when :page
  FbGraph::Page.new(PAGE_ID, :access_token => ACCESS_TOKEN)
when :group
  FbGraph::Group.new(GROUP_ID, :access_token => ACCESS_TOKEN)
end

subject.video!(
  :source => File.new(MOVIE_FILE_PATH), # required!
  :title => 'Optional Video Title',
  :description => 'Optional Video Description'
)
Something went wrong with that request. Please try again.