【问题标题】:Promlem with retrieving Facebook profile image检索 Facebook 个人资料图片时出现问题
【发布时间】:2018-09-05 23:39:20
【问题描述】:

从今天开始,我无法加载带有 url 的 Facebook 个人资料图片 http://graph.facebook.com/profile_id/picture?type=large&width=200&height=200

现在它可以下载带有问号的 8x8 像素小图片。

不适用于 Android 和 Unity 编辑器。 在 iOS 设备上运行良好。

任何想法如何获取个人资料图片?

谢谢。

【问题讨论】:

标签: image facebook url profile


【解决方案1】:

【讨论】:

    【解决方案2】:

    当我使用从 Firebase 获得的个人资料网址时,我遇到了同样的问题,我的解决方案是使用来自 facebook 的个人资料网址,如下所示:

    string imageUri = String.Format("https://graph.facebook.com/{0}/picture?type=large&width=100&height=100", your_id);
    
    IEnumerator LoadImage(string imageUri)
        {
    
            WWW www = new WWW(imageUri);
            yield return www;
    
            Debug.Log("Width = " + www.texture.width + "; Height = " + www.texture.height);
            Avata.sprite = Sprite.Create(www.texture, new Rect(0, 0, www.texture.width, www.texture.height), new Vector2(0, 0));
        }
    

    而且它也有效。希望对您有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-12-20
      • 1970-01-01
      • 2015-05-21
      • 1970-01-01
      • 2017-11-16
      • 2014-01-09
      • 2012-06-08
      相关资源
      最近更新 更多