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

问题描述 投票:0回答:1

我正在尝试将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

android facebook facebook-graph-api infowindow
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.