Note that there are some explanatory texts on larger screens.

plurals
  1. POcall getUserAccessToken() return error
    text
    copied!<p>I am using facebook app that can publish message on users wall , My Error Message :</p> <pre><code>Fatal error: Call to protected method BaseFacebook::getUserAccessToken() from context '' in /home/tillaf/public_html/facebook/login_facebook2.php on line 61 My file : &lt;?php require_once("facebook.php"); @session_start(); $app_id = "********"; $app_secret = "*********"; $my_url = "http://t.****.net/**/login.php/"; /// $config = array(); $config['appId'] = '408682199198463'; $config['secret'] = 'd5b3c0ddfbd673dd94494f28524c1a84'; $config['fileUpload'] = false; // optional $facebook = new Facebook($config); /// //// //// $code = $_REQUEST["code"]; if(empty($code)) { $_SESSION['state'] = md5(uniqid(rand(), TRUE)); // CSRF protection $dialog_url = "https://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;state=" . $_SESSION['state'] . "&amp;scope=user_birthday,read_stream,publish_stream,email,user_status,offline_access"; echo("&lt;script&gt; top.location.href='" . $dialog_url . "'&lt;/script&gt;"); } else{ $user_id = $facebook-&gt;getUser(); echo $user_id; echo "&lt;br/&gt;"; ////////// Get Access Token /* $app_token_url = "https://graph.facebook.com/oauth/access_token?" . "client_id=" . $app_id . "&amp;client_secret=" . $app_secret . "&amp;grant_type=client_credentials"; $response = file_get_contents($app_token_url); $params = null; parse_str($response, $params); echo("This app's access token is: " . $params['access_token']); */ ///------------- $user_access_token = $facebook-&gt;getUserAccessToken(); //////// ////// Start publish on wall //$facebook-&gt;getAccessTokenFromCode($_GET['code']); $message='ssss'; $link='http://www.google.com'; $name='Samilox'; $caption='s'; $description='Descrption...'; $facebook-&gt;api("/me/feed",'POST', array( 'access_token' =&gt;$user_access_token, 'message' =&gt; 'Hello World!', 'link' =&gt; 'www.example.com' ) ); /// } ?&gt; </code></pre> <p>Sorry For Code :) because i am trying many solutions before i post this question .</p> <p>Please Can anyone help ? Thanks in advance </p>
 

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