how to post score to facebook

hi,
i am working on a simple endless runner to post in wooglie.com.
it is almost done… but i want to post the score that the player makes on facebook.
can anyone help me with this? and are there any legal issues? thanks…

i have seen this…
http://forum.unity3d.com/threads/33898-Unity-Facebook-Project
… but none of the links given here are working.

There’s a very simple way to do this without dealing with permissions or plugins. If all you want to do is post a high score and some info, you just need to make a Facebook app then use it to post via URL redirection. I’ve posted about it here, but the code is thus:

private const string FACEBOOK_APP_ID = "123456789000";
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));
}

There are a few gotchas primarily dealing with the redirect parameter. Basically, if you want to redirect to an outside domain after posting, you need to register a website platform with your app, using the page to link to as the site URL, and then add that page’s domain to your app domains. Otherwise, just redirect to “http://www.facebook.com/”, as the redirect_uri is required.

Just use one of the plugins available in the Asset Store.

it would be total madness to reduplicate this work.

The asset store is your friend!

Hi

We’ve created a step by step tutorial with Prime 31’s Social Networking Plugin
so that you can add Facebook based scores/leaderboards in your game :

http://2piinteractive.blogspot.in/

Regards

This seems better option.