|
|
|
Warning: Invalid argument supplied for foreach() feed facebook |
|
|
|
|
|
|
|
Code (PHP)
<?php
$source='https://graph.facebook.com/'.$user_profile["id"].'?fields=feed&access_token='.$access_token.'&limit=30';
$jsource=file_get_contents("text.txt");
$jsonfeed = json_decode($jsource);
print_r($jsonfeed->feed->data);
foreach ($jsonfeed->feed->data as $data ) {
?>
<div class="cv-section-item">
<h4 class="title"><?php echo $data->from->name;?></h4>
<?php if(empty($data->message)){?>
<h4 class="meta"> </h4>
<?php }else{?>
<h4 class="meta">"<?php echo $data->message;?>"</h4>
<?php }?>
<img src="http://graph.facebook.com/<?php echo $data->from->id;?>/picture" style=" border:#006699 solid 5px;" align="left"/>
<?php if(empty($data->picture)){}else{?>
<img src="<?php echo $data->picture;?>" style="width:80px; margin-bottom:10px; border:#999999 solid 5px;" align="right"/>
<?php }?>
<div style="margin-left:65px; width:540px;"><p><?php echo date("d (D), M Y", strtotime($data->created_time));?></p>
<?php if(empty($data->name)){?>
<?php }else{ ?>
<p><a href="<?php echo $data->link;?>">"<?php echo $data->name;?>"</a></p> <p><?php echo $data->description;?></p>
<?php }?>
<?php if(empty($data->application->name)){}else{?>
<?php }?>
<p>
<?php foreach($data->likes->data as $valike){ error ตรงนี้อะครับ
?>
<a href="http://www.facebook.com/<?php echo $valike->id;?>"><img src="http://graph.facebook.com/<?php echo $valike->id;?>/picture" style="float:left; padding-right:5px; width:24px; height:24px;"/></a>
<?php }?> <?php if(empty($data->likes->count)){}else{?>Likes: ( <?php echo $data->likes->count;?> )<?php }?></p>
</div>
<div class="line"></div>
<?php
foreach($data->comments->data as $values){ error ตรงนี้อะครับ
?>
|
|
|
|
|
Date :
2013-03-07 23:40:37 |
By :
dastardly |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
<?php
$source='https://graph.facebook.com/'.$user_profile["id"].'?fields=feed&access_token='.$access_token.'&limit=30';
$jsource=file_get_contents("text.txt");
$jsonfeed = json_decode($jsource);
print_r($jsonfeed->feed->data);
foreach ($jsonfeed->feed->data as $data ) {
?>
<div class="cv-section-item">
<h4 class="title"><?php echo $data->from->name;?></h4>
<?php if(empty($data->message)){?>
<h4 class="meta"> </h4>
<?php }else{?>
<h4 class="meta">"<?php echo $data->message;?>"</h4>
<?php }?>
<img src="http://graph.facebook.com/<?php echo $data->from->id;?>/picture" style=" border:#006699 solid 5px;" align="left"/>
<?php if(empty($data->picture)){}else{?>
<img src="<?php echo $data->picture;?>" style="width:80px; margin-bottom:10px; border:#999999 solid 5px;" align="right"/>
<?php }?>
<div style="margin-left:65px; width:540px;"><p><?php echo date("d (D), M Y", strtotime($data->created_time));?></p>
<?php if(empty($data->name)){?>
<?php }else{ ?>
<p><a href="<?php echo $data->link;?>">"<?php echo $data->name;?>"</a></p> <p><?php echo $data->description;?></p>
<?php }?>
<?php if(empty($data->application->name)){}else{?>
<?php }?>
<p>
<?php foreach($data->likes->data as $valike){ error ตรงนี้อะครับ
?>
<a href="http://www.facebook.com/<?php echo $valike->id;?>"><img src="http://graph.facebook.com/<?php echo $valike->id;?>/picture" style="float:left; padding-right:5px; width:24px; height:24px;"/></a>
<?php }?> <?php if(empty($data->likes->count)){}else{?>Likes: ( <?php echo $data->likes->count;?> )<?php }?></p>
</div>
<div class="line"></div>
<?php
foreach($data->comments->data as $values){ error ตรงนี้อะครับ
?>
|
|
|
|
|
Date :
2013-03-07 23:47:54 |
By :
dastardly |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Date :
2013-03-08 06:06:15 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|