-
-
Notifications
You must be signed in to change notification settings - Fork 191
Video Upload
nov matake edited this page Jun 18, 2011
·
3 revisions
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'
)