How can I have the player share this score to facebook,
GUILayout.Label("Score: " + currentScore);
, with this button?
if(GUILayout.Button("Highscore", GUILayout.Height(Screen.height / 8)))
{
Debug.Log("Share Highscore");
}
How can I have the player share this score to facebook,
GUILayout.Label("Score: " + currentScore);
, with this button?
if(GUILayout.Button("Highscore", GUILayout.Height(Screen.height / 8)))
{
Debug.Log("Share Highscore");
}
Here is some code which should help, this code works for me.
int score = 10000;
var scoreData =
new Dictionary<string, string>() {{"score", score.ToString()}};
FB.API ("/me/scores", HttpMethod.POST, LogCallback, scoreData);
// Logs "true"