Facebook图表图片不可靠 [英] Facebook graph profile image unreliable

查看:101
本文介绍了Facebook图表图片不可靠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的Facebook应用程序上显示评论Feed,我加载了一系列Facebook用户标识和相关评论,以显示用户个人资料图片,我使用以下代码片段:

 <?php echo'< img src =http://graph.facebook.com/'.$c->_user。 '/ picture'/> ;; ?> 

这工作正常,并获取图像,但是,如果我刷新我的页面,我得到一些if不是所有的缩略图都不会被加载,刷新一次,他们总是在那里,这是非常一致的,当我刷新,他们会出现,下次他们不会等等。



我应该用不同的方式处理吗?我知道在浏览器中,图形API重定向到实际的图像,所以也许这是导致我的浏览器有时不显示它们,说如果加载图像花了太长时间?

解决方案

问题可能是基因φ说说,只是Facebook的临时问题。但是为了补充他的建议,您可以尝试从 https:提供图像。或者,您可以从 <$ c $获取完整的无重定向照片网址c>用户 FQL表


I am trying to display a comments feed on my Facebook application, I am loading in an array of Facebook user ids and an associated comment, to display the users profile picture, I am using the following snippet:

<?php echo '<img src="http://graph.facebook.com/'.$c->_user.'/picture'" />; ?>

This works fine, and gets the image, however, if I refresh my page, I get some if not all of the thumbnails will not be loaded, refresh again and they'll always be there, it's pretty consistent that when I refresh they'll appear, next time they won't and so on.

Should I be dealing with this differently ? I know that in the browser the graph API redirects to the actual image, so maybe this is what's causing my browser to sometimes not display them, say if, it took too long to load the image ?

解决方案

The issue is probably what genesis φ says says, just a temporary issue on Facebook's end. But to add on to his suggestions, you might try serving the image from https:. Alternatively, you can get the full, redirect-less picture URL from the user FQL table.

这篇关于Facebook图表图片不可靠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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