작동하지 WWW를 사용하여 프로필 사진을 얻을. URL 다운로드가 완료되지 않았습니다. 인쇄 중이 아니며 오류가 표시되지 않습니다.연합 페이스 북 SDK 난 내가 뭔가 잘 갑자기 둘째 날 URL이 다운로드되지 않은 작업 한이 코드를 사용할 때 페이스 북의 SDK를</p> <p>를 사용하여 페이스 북의 프로필 사진을 얻기 위해 노력하고 있어요
private IEnumerator getProfilePicture()
{
Debug.Log("Here to get profile picture");
WWW url = new WWW("https" + "://graph.facebook.com/" + FB.UserId + "/picture?type=square");
yield return url;
Debug.Log("url download completed");
Texture2D textFb2 = new Texture2D(url.texture.width, url.texture.height, TextureFormat.ARGB32, false);
Sprite sprite = Sprite.Create(url.texture, new Rect(0, 0, url.texture.width, url.texture.height), new Vector2(0.5f, 0.5f), 32);
spriteToDisplay.GetComponent<SpriteRenderer>().sprite = sprite;
}
그것은 나를 위해 작동합니다 - 당신은 StartCoroutine (getProfilePicture())로 호출하고 있습니까? ? – izeed
그래, 나는 StartCoroutine (getProfilePicture())로 시도했다; 및 StartCoroutine ("getProfilePicture"); 둘 다 내가 다른 페이스 북의 appid와 함께 노력했지만 그것은 인쇄되지 않습니다 URL을 다운로드 완료 –
http://download.unity3d.com/webplayer/images/unity-icon-big.jpg - www 필드 에서이 문자열을주는 것은 잘 작동 –