Note that there are some explanatory texts on larger screens.

plurals
  1. POFacebook api authorization in IE
    primarykey
    data
    text
    <p>I have a problem with facebook authorization in Internet Explorer. This code works in Firefox, chrome and safari, but not in IE.</p> <p>After clicking on href with loginUrl this message appears (only in IE otherwise is all good).</p> <blockquote> <p>Fatal error: Uncaught OAuthException: An active access token must be used to query information about the current user. thrown in /data/web/virtuals/30096/virtual/www/qcomp/libs/base_facebook.php on line 1238</p> </blockquote> <p>Here is my code:</p> <p><code> <pre> session_start(); define('APP_ID', 'SOMETHING'); define('APP_SECRET', 'SOMETHING'); define('CANVAS_PAGE', 'SOMETHING'); define('CANVAS_URL', 'SOMETHING'); require_once './libs/facebook.php'; $facebook = new Facebook( array('appId' =&gt; APP_ID, 'secret' =&gt; APP_SECRET, )); $user = $facebook-&gt;getUser(); $redirecturl = 'BACK_TO_TAB'; if(isset($user)) { try { $user_profile = $facebook-&gt;api('/me'); $user_friends = $facebook-&gt;api('/me/friends'); $_SESSION['user'] = $user_profile; $_SESSION['friends'] = $user_friends; } catch (FacebookApiException $e) { $user = NULL; } } if($user == NULL) { $loginUrl = $facebook-&gt;getLoginUrl( array( 'scope' =&gt; 'publish_stream', 'redirect_uri' =&gt; 'URL', ) ); } else { header("Location: ./step2.php"); $_SESSION['user'] = $user_profile; $_SESSION['friends'] = $user_friends; } ?&gt; &lt;!doctype html&gt; &lt;html&gt; &lt;head&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="layout"&gt; &lt;a href="&lt;?php echo $loginUrl ?&gt;" target="_blank"&gt; &lt;div class="enter"&gt;&lt;/div&gt; &lt;/a&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Thank you for your advices.</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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