Sharing Video to facebook in android?
i need to integrate facebook api in to my application , i am new one to integrating api in android. Anyone help me out ,how to integrate the facebook api into android application.
My intended to share the youtube video to facebook, i have the link , i need to share it to facebook ,i don开发者_如何学编程`t want to be post the link on my wall, i need to share the Video.
Thanks.
This question was made long ago, but in case if someone else needs this like I did, here's the answer.
I won't post the entire code because it's too much. Just follow this page, is basically copy-paste: http://developers.facebook.com/docs/android/share
Here's the important part, which is when building the params. Basically if you set just the link param
in the Bundle
, Facebook will automatically fill the rest of the info with the details of that video.
Here's an example:
Bundle params = new Bundle();
//params.putString("name", "Youtube Video");
//params.putString("caption", "YOUTUBE.COM");
//params.putString("description", "This is automatically set");
params.putString("link", "http://www.youtube.com/watch?v=UNfnLD6FiX0");
//params.putString("picture", "some-url.png");
And here's the output:
Facebook provides an Android SDK, read the README and look at the samples. It's easy to use.
精彩评论