dongyanling9248 2013-04-10 11:02
浏览 30
已采纳

Facebook页面提要和照片

I want to show in my home the last feed of my Facebook page, I'm then hooking at this link: https://www.facebook.com/feeds/page.php?id=204770913907&format=json The problem is that facebook provides images in this format: https://www.facebook.com/photo.php?fbid=10151523034618908&set=a.10150426023073908.381002.204770913907&type=1

And then I'm trying to convert them in direct jpg format, but the variables listed in the link above does not help to make up what should be the following link: https://fbcdn-sphotos-ga.akamaihd.net/hphotos-ak-ash3/733911_10151523034618908_777095662_n.jpg

How can I do it?

  • 写回答

1条回答 默认 最新

  • doulin3510 2013-04-10 13:17
    关注

    Use a regexp to get the image from the content field

        preg_match('/.*(class="img" src=")([^"]+)(".*)/',$test,$matches);
    echo $matches[2]; //img
    

    Or use the facebook api to get your picture

    http://developers.facebook.com/docs/reference/api/using-pictures/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 vue3加ant-design-vue无法渲染出页面
  • ¥15 matlab(相关搜索:紧聚焦)
  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
  • ¥15 路易威登官网 里边的参数逆向
  • ¥15 Arduino无法同时连接多个hx711模块,如何解决?
  • ¥50 需求一个up主付费课程
  • ¥20 模型在y分布之外的数据上预测能力不好如何解决
  • ¥15 processing提取音乐节奏
  • ¥15 gg加速器加速游戏时,提示不是x86架构
  • ¥15 python按要求编写程序