Facebook user image not showing on <img> tag

非 Y 不嫁゛ 提交于 2019-12-12 02:32:44

问题


I have a .ejs page with this piece of code

<li><% if(userInfo.image=="" || userInfo.image==null || userInfo.image==undefined){ %>
    <img src="/assets/img/default.png" class="img-responsive pic-bordered" alt="" /><%}else{%>
    <img src="
        <%= userInfo.image%>" class="img-responsive pic-bordered" alt="" /><%}%>
</li>

The userInfo.image value is "http://graph.facebook.com/xxx728122636xxxx/picture?redirect=true&width=432&height=432" but the image doesn't show.

example: https://jsfiddle.net/f6dsp3wd/1/

Edit Ok i figured out. This computer im working on has a extension on its browsers named "Ghostery" that was blocking the display of facebook image

you can close this


回答1:


Try with https://graph.facebook.com/<%= userInfo.id %>/picture?type=square.



来源:https://stackoverflow.com/questions/37878344/facebook-user-image-not-showing-on-img-tag

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!