Upload Video to Facebook Using Actionscrpt 3.0

For the last one week am searching for uploading video to Facebook using Graph Api from Flash. First challenge is to find something which will help to capture video from webcamera and convert it to ByteArray.
The problem is Actionscript doesn't had any utlity to save video from webcamera. It uses Flash media server to save video. But i need something which not uses any server side acript.
After searching several hours in google i found a link.

In this utility it uses snapshots from the webcamera which will encode it . Though it had some drawbacks and limitations, it serves my requirement for small videos. I used it for creating videos.

Next i need to upload video to facebook. This is the api used to connect facebook using Actionscript.


This API uses a different function for uploading videos to facebook .Facebook.uploadVideo(). The reason for different function is that , Facebook uses a different API Url https://graph-video.facebook.com unlike the normal URL https://graph.facebook.com. I have attached the source here.

Code Explained

I used FacebookConnectLogin class for my facebook authentication and activities. For the video part plaese refer the above mentioned link.
public function uploadVideo(br:ByteArray)
   var obj:Object=new Object();
   obj.title = "Vidoe upload";
   obj.description = "video testing";
   obj.fileName ="test"+Math.random()+".flv"
   obj.video = br;
  private function videoUploaded(response:Object,fail:Object)
   if (response)

   if (fail)
This is the code for uploading video to facebook. The only parameter you are concerned about is the obj.video. Here we pass the ByteArray from  the FlvEncoder.

NOTE:1.  Try some small video files like 5 - 10 secs long. Above these, it's possible to crash your browser.
And also it will take long time to upload video to facebook
2. And also check Facebook Policies and terms to know the limitations.


Unknown said…
I must say that this is a great post..Really i am impressed from this post....the person who create this post it was a great human. I put a link to your blog at my site,
Unknown said…
The way you write make it truly effortless to read. And the theme you use, wow. I want to follow up and let you know how great I treasured discovering your web blog today. I will consider it a real honor to operate at my workplace and be able to use the tips provided on your web page and also take part in visitors’ opinions like this. Should a position of guest article author become offered at your end, remember to let me know.Monitor children
Unknown said…
Thanks for sharing this information you can upload your video and photos here and win prizes.
Share Photos and Win Prizes
Tittu said…
Good Post..
Go here to Download Facebook videos online in HD quality for free.
Unknown said…
This is a great article, that I really enjoyed reading. Thanks for sharing.

facebook video downloader
usps tracking
youtube to mp3
Unknown said…
Really impressive post. I enjoyed your article and planning to rewrite it on my own blog
Plants vs Zombies , Solitaire,Tom And Jerry Games, Brain Games, Happy Wheels , FNAF World
swesub said…
nice, This is a great article, that I really enjoyed reading. Thanks for sharing. ^^
Unknown said…
nice, I really enjoy reading this article. Hope that you would do great in upcoming time. A perfect post. ^^
Games For Kids said…
Let’s keep out sites for your child! click:
brain games | puzzle games | tetris | happy wheels | agario | abcya | fnaf 4 | super mario games
To play for free!
Unknown said…
This information is worth everyone’s attention.

Watch Independence Day: Resurgence
Hold said…
You have got the best online sites.

Movies of action on 123movies
Unknown said…
A lot of people will be benefited from your writing. Cheers!

Music Online on Kissanime
nnn said…
I have to thank you for the efforts you’ve put in penning this site. Thanks again

Watch Invasion of the Body Snatchers Online
Unknown said…
Very good website keep it up

War Movies
Cineblog said…
Cool web site you've right here.

Animazione Cineblog01
fmovies said…
i always love chaking your blog
123 Putlocker said…
You have got the best online sites. www.123putlocker.biz

Unknown said…
This comment has been removed by the author.
yesmovies said…
Cool web site you've right here.
frivtn100 said…
We are really grateful for your blog post. You will find a lot of approaches after visiting your post. Great work.
friv baby game
friv racing game
friv shooting game
game for girl
girl games 3
girl game school
Unknown said…
a pride for me to be able to discuss on a quality website because I just learned to make an article on
cara menggugurkan kandungan
Anonymous said…
Thanks For sharing an informative blog keep rocking bring more details
Google ads company
Google ads services
Google ads services provider
Google ads management services
menyeng said…
I thank you for the information and articles you provided cara menggugurkan kandungan dan mempercepat haid
kimay said…
Now comes the latest wordpres entitled cara menggugurkan kandungan
May said…
Technology News is a guide and recommendation blog on the most popular switches , sound card , wifi adapters , best convertible Laptops technology this year.

Popular posts from this blog

Configure PostgreSQL and phpPgAdmin in WAMP

Angular - 4 year road map

Flash FLV player using PHP