egcmx
-
Posts
7 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Downloads
Gallery
Store
Posts posted by egcmx
-
-
yes i'm following a tutorial. when i try to print $json_object or $fb_data it returns a null/blank value.
-
so here is my code:
<?php
$page_id = '552721801408793';
$access_token = '558308744244333|TsDvTos1cL4WpQnWxQUdm0_xsTs';
//Get the JSON
$json_object = @file_get_contents('https://graph.facebook.com/' . $page_id .
'/posts?access_token=' . $access_token);
//Interpret data
$fbdata = json_decode($json_object);
foreach ($fbdata->data as $post)
{
$posts .= '<p><a href="' . $post->link . '">' . $post->story . '</a></p>';
$posts .= '<p><a href="' . $post->link . '">' . $post->message . '</a></p>';
$posts .= '<p>' . $post->description . '</p>';
$posts .= '<br />';
}
?>
it gives me these errors:
Notice: Trying to get property of non-object in C:\xampp\htdocs\droga\feed.php on line 10
Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\droga\feed.php on line 10
please help me! thanks!
-
thanks a lot man! you're a lifesaver!
-
i got two files, login.php and menu.php. session_register and session_is_registered is no longer available for php 5.4. so i used $_SESSION and isset. but it keeps redirecting to login.php. can someone help me?
LOGIN.PHP
----------------
$_SESSION['username']=$username;
header("Location:menu.php");
MENU.PHP
----------------
session_start();
if(!isset($_SESSION['username']))
{
header("location:login.php");
}
-
i already fixed it. i need to put the files inside a folder inside xampp/htdocs/ for the php codes to work. thanks by the way!
-
i'm using xampp. when i open view.php chrome and firefox are displaying this. when i open it on internet explorer it downloads the file. please help me. thanks!
Help With Facebook News Feed
in PHP
Posted
thanks again ben! you saved me for the second time!