在自定义信息窗口中将Facebook图像加载到imageview

时间:2019-10-28 11:04:01

标签: android facebook facebook-graph-api infowindow

我正在尝试将Facebook个人资料图片加载到自定义信息窗口中的android imageview中,但是未加载facebook图像。当我加载任何其他图像时,它会成功加载。

Facebook网址:https://graph.facebook.com/2730504023660798/picture?width=130&height=130

图片加载代码段

val profile = view.findViewById<AppCompatImageView>(R.id.profileIv)

    visitor.fbId?.let {
        profile.loadImageFromUrlWithRefreshInfo(
            it,
            InfoWindowRefresher(marker)
        )
    }

信息窗口刷新代码段

inner class InfoWindowRefresher(private val markerToRefresh: Marker?) :
    Callback {

    override fun onError(e: Exception?) {

    }


    override fun onSuccess() {
        if (markerToRefresh != null && markerToRefresh.isInfoWindowShown) {
            markerToRefresh.hideInfoWindow()
            markerToRefresh.showInfoWindow()
        }
    }
}

当我加载测试图像成功加载

Image With Different URL

我加载Facebook URL时显示为空

enter image description here

我已遵循这些链接,但没有任何帮助。

Facebook graph user picture won't show on mobile devices

Picasso library stopped working today with facebook graph picture links

I can't load images from Graph Facebook

0 个答案:

没有答案
相关问题