问题
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