Property or indexer `UnityEngine.UI.Graphic.mainTexture' cannot be assigned to (it is read-only)

**I am using Facebook SDK 10. Trying to get Profile Picture, “ProfilePic” is a Image type variable. **

Use this instead, works in most cases

Rect rect = new Rect (0, 0, 2, 2);
		var www = new WWW ("http://graph.facebook.com/" + token.UserId + "/picture?width=210&&height=210");
		while (!www.isDone)
		{
//			Debug.Log ("not yet");
		}
//		yield return www;
		Texture2D tempic = new Texture2D (25, 25);
		Debug.Log ("Download Finished");
		ProfilePic.sprite = Sprite.Create (tempic, rect, new Vector2 ());   //or use the linw below

// ProfilePic.sprite = Sprite.Create(www.texture, rect, new Vector2());