facebook php - 如何获取专辑封面照片
我需要使用 PHP SDK (Facebook) 获取专辑封面照片。 我尝试使用:
https://graph.facebook.com/[ALBUM_ID]/picture?type=album,但我得到默认图像...例如...获取用户 https://graph 的个人资料图片。 facebook.com/[USER_ID]/picture?type=square
有人可以告诉我获取相册封面照片的正确方法吗?
谢谢。
I need to get the album cover photo with the PHP SDK (Facebook).
I try with:
https://graph.facebook.com/[ALBUM_ID]/picture?type=album, but I get a default image... for example... to get profile pic of user https://graph.facebook.com/[USER_ID]/picture?type=square
Somebody can tell me the correct way to get cover photo for albums please.
thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以只使用 FQL,这是我的首选方法,并且提供了很大的灵活性。此代码示例应该是您所需要的:
您可以在此处找到对所有 FQL 表的引用: http://developers.facebook.com/docs/reference/fql/
You could just use FQL, it is my preferred method and offers a lot of flexibility. This code sample should be what you need:
You can find a reference to all of the FQL tables here: http://developers.facebook.com/docs/reference/fql/
封面图像的 URL 是 https://graph.facebook.com/[album_id]?fields=picture
其他人解释的 FQL 方法是一种方法。我会这样做:
The URL for the cover image is https://graph.facebook.com/[album_id]?fields=picture
The FQL method as someone else explained is one way. I'd do it this way:
专辑的封面照片是专辑第一张上传的图片。如果相册中没有任何图像,封面图像将是一个问号。
The album's cover photo is the album's first uploaded image. If you haven't got any image in the album, the cover image will be a question mark.