I using following code to get user data from facebook
IEnumerator UserFBDataGet(string accessTkn)
{
var downloader3 = new WWW ( "http://ift.tt/1JLg8Pe"+accessTkn );
//Application.OpenURL ( "http://ift.tt/1JLg8Pe"+accessTkn );
yield return downloader3;
print(" downloader3.text ="+downloader3.text );
if(downloader3.error == null)
{
print(" downloader3.text ="+downloader3.text );
}
else
{
print(" downloader3.error ="+downloader3.error );
}
}
It showing Error
You are trying to load data from a www stream which had the following error when downloading. 400 Bad Request UnityEngine.WWW:get_text() c__Iterator1:MoveNext() (at Assets/FBDesktopManager.cs:126)
Even i use WWWForm same error is showing
IEnumerator UserFBDataGet(string accessTkn)
{
userDataGetUrl = "http://ift.tt/P3QvMV?";
WWWForm wf = new WWWForm();
wf.AddField ("fields","id,name,email") ;
wf.AddField ("access_token",accessTkn) ;
WWW downloader3 = new WWW(userDataGetUrl,wf) ;
yield return downloader3;
print(" downloader3.text ="+downloader3.text );
if(downloader3.error == null)
{
print(" downloader3.text ="+downloader3.text );
}
else
{
print(" downloader3.error ="+downloader3.error );
}
}
But when I call
Application.OpenURL ( "http://ift.tt/1JLg8Pe"+accessTkn );
in that page i get all data properly.
Aucun commentaire:
Enregistrer un commentaire