I am new to Facebook app development. I created a sample app for learning. the code is as follows . Basically i want to print the profile name of the user. It will be great if I can get explanation of this code especially for the Italicized section.
enter code here
<html>
<body>
<h1> Inspirations </h1>
<div id = "quote">
<span id="facebook_stuff">
<div id = "profile_pic"><img src="https://graph.facebook.com/1452321522/picture" border="0" /> </div>
<?php
require 'facebook.php' ;
$facebook = new Facebook(array(
‘appId’ => 'my app id',
‘secret’ => 'my app secret',
'cookie' => 'true',
));
$user = $facebook->api('/1452321522');
?>
<div id="profile_name"> <?php echo $user['name'] ?> </div>
</span>
"Love is god"
</div>
</body>
</html>
I am getting the following output
Inspirations
{image}
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/04/8471304/html/index.php:5) in /home/content/04/8471304/html/facebook.php on line 37
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/04/8471304/html/index.php:5) in /home/content/04/8471304/html/facebook.php on line 37
Fatal error: Uncaught OAuthException: Invalid OAuth access token signature. thrown in /home/content/04/8471304/html/base_facebook.php on line 970