I have this project I'm working on and id like to add a really small list of nearby places using Facebook's places in an iframe
feature from touch.facebook.com. I can easily just use touch.facebook.com/#places.php
but then that loads the top bars.
Anyway, is there a way I could manipulate the URL so that it will only load the places content rather than having the top and bottom menu bars. After looking at the code it looks like there is a div id="content"
. I was thinking maybe there was a way to make the URL so that it will only load that div? I also tried making a URL that might just jump down to content using touch.facebook.com/#places.php#content
but apparently with that way touch.facebook.com was built that doesn't work.
I'd really rather figure out a way to just load only the section of content.
I went ahead and tried this approach in PHP. I read the examples for file_get_contents
and what's being here looks right, according to example 1:
<?php
$page = file_get_contents('http://touch.facebook.com');
$doc = new DOMDocument();
$doc->loadHTML($page);
$divs = $doc->getElementsByTagName('div');
foreach($divs as $div) {
if ($div->getAttribute('id') === 'content') {
echo $div->nodeValue;
}
}
?>
But, I get a completely blank page.