Facebook用户图像未显示在< img>上标签 [英] Facebook user image not showing on <img> tag

查看:91
本文介绍了Facebook用户图像未显示在< img>上标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有这段代码的.ejs页面

 < li><%if(userInfo.image == || userInfo.image ==空|| userInfo.image ==未定义){%> 
< img src = / assets / img / default.png class = img响应图片边框 alt = /><%} else {%>
< img src =
<%= userInfo.image%> class = img-sensitive pic-bordered alt = /><%}%>
< / li>

userInfo.image值为 http://graph.facebook.com/xxx728122636xxxx/picture?redirect=true&width=432&height=432
,但图片未显示。



示例: https://jsfiddle.net/f6dsp3wd/1/



编辑
好我想通了。正在运行的这台计算机在其浏览器上有一个名为 Ghostery的扩展程序,该扩展程序阻止了Facebook图像的显示。

解决方案

尝试使用 https://graph.facebook.com/<%= userInfo.id%> / picture?type =正方形


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

解决方案

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

这篇关于Facebook用户图像未显示在&lt; img&gt;上标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆