从 Facebook 活动提要中提取链接

发布于 2024-10-10 14:21:15 字数 275 浏览 0 评论 0原文

我试图从 Facebook 活动源获取链接,我尝试从 iframe 中提取 HTML,但由于跨域,这不起作用。然后我尝试了 cURL 但由于 javascript 而不起作用。

http://developers.facebook.com/docs/reference/plugins/activity

有什么想法吗?

I'm trying to get the links from a facebook activity feed, i've tried extracting the HTML from the iframe, but this doesn't work because of cross domain. Then I tried cURL but that doesn't work because of the javascript.

http://developers.facebook.com/docs/reference/plugins/activity

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

小鸟爱天空丶 2024-10-17 14:21:15

这是不可能的,基本上它需要您无法在 iframe 中维护的会话,几天前我通过 file_get_contents 和 cURL 尝试过此操作,但没有任何效果。

It is not possible, basically it requires your session that you can't maintain in iframe, I tried this some days ago through file_get_contents and cURL but nothing works.

终止放荡 2024-10-17 14:21:15

您可以尝试使用 jQuery 之类的 javascript 库来提取所有链接,然后将数据发送到 PHP 脚本,但如果您尝试将其自动化,则这将不起作用。

最好的选择是使用 Facebook API 而不是社交插件。

You could try using a javascript library like jQuery to extract all of the links then send the data to a PHP script but that wouldn't work if your trying to automate it.

Your best bet is to use the Facebook API rather than a social plugin.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文