How to share images to facebook from unity webplayer.After creating the application in Facebook and downloaded the facebook Sdk imported to the project.Run the build in browser press FB.int(),the facebook dll is not loading to connect with facebook. Wether facebook SDK will work for Webplayer.
Finally got idea of Facebook share for webplayer from the following link.
Followed the above link and successfully shared the images in facebook from unity.
private const string FACEBOOK_APP_ID = "1234567";
private const string FACEBOOK_URL = "http://www.facebook.com/dialog/feed";
void ShareToFacebook (string linkParameter, string nameParameter, string captionParameter, string descriptionParameter, string pictureParameter, string redirectParameter)
{
Application.OpenURL (FACEBOOK_URL + "?app_id=" + FACEBOOK_APP_ID +
"&link=" + WWW.EscapeURL(linkParameter) +
"&name=" + WWW.EscapeURL(nameParameter) +
"&caption=" + WWW.EscapeURL(captionParameter) +
"&description=" + WWW.EscapeURL(descriptionParameter) +
"&picture=" + WWW.EscapeURL(pictureParameter) +
"&redirect_uri=" + WWW.EscapeURL(redirectParameter));
}
I never shipped anything to facebook platform and never used its API but i tried to find some useful documents for you…
Look at this ‘Parse’ link first of all, you may find it useful: Parse Platform
than here are the official documentations of Facebook related Unity & Facebook integration:
Also here is a tutorial of a community called ‘Facebook Developers’ 's tutorial about integrating Facebook into unity:
Hope these documentations and tutorials helps you…