Extract Links from Facebook activity feed

懵懂的女人 提交于 2019-12-23 04:55:16

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/4603733/extract-links-from-facebook-activity-feed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!