Note that there are some explanatory texts on larger screens.

plurals
  1. PORead User Wall Post and others who posted on wall
    primarykey
    data
    text
    <p>I am new to the facebook graph API ,but I know the basics. Now I need help from you all about how to read user wall posts and others who posted on the wall of any user, with <code>read_stream</code>. But I don't know how to call it. I tried some way but I was able to read just the name and basic info. I need help in reading objects. Please help me!!!</p> <pre><code>&lt;?php define('FACEBOOK_APP_ID', 'xxxxxx'); define('FACEBOOK_SECRET', 'xxxxxx'); function get_facebook_cookie($app_id, $application_secret) { $args = array(); parse_str(trim($_COOKIE['fbs_' . $app_id], '\\"'), $args); ksort($args); $payload = ''; foreach ($args as $key =&gt; $value) { if ($key != 'sig') { $payload .= $key . '=' . $value; } } if (md5($payload . $application_secret) != $args['sig']) { return null; } return $args; } $cookie = get_facebook_cookie(FACEBOOK_APP_ID, FACEBOOK_SECRET); ?&gt; &lt;!DOCTYPE html&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"&gt; &lt;body&gt; &lt;?php echo 'Your Facebook ID: '.$cookie; if ($cookie) { //cookie is set, user is logged in $user = json_decode(file_get_contents('http://graph.facebook.com/'.$cookie['uid'])); //Display the facebook user ID, name, gender and Facebook URL in the web browser echo '&lt;br /&gt;'; echo 'Your Facebook ID: '.$user-&gt;{'id'}; echo '&lt;br /&gt;'; echo 'Your name: '.$user-&gt;{'name'}; echo '&lt;br /&gt;'; echo 'Your gender: '.$user-&gt;{'gender'}; echo '&lt;br /&gt;'; echo 'Your Facebook URL: '.$user-&gt;{'link'}; echo '&lt;br /&gt;'; echo '&lt;img src="http://graph.facebook.com/'.$user-&gt;{'id.'/picture" alt="'.$user-&gt; {'name'}.'"/&gt;'; echo '&lt;br /&gt;'; echo '&lt;fb:login-button autologoutlink="true"&gt;&lt;/fb:login-button&gt;'; } else { //user is not logged in, display the Facebook login button echo '&lt;h2&gt;Facebook Application Test page&lt;/h2&gt;'; echo '&lt;br /&gt;'; echo' message somethng'; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload