Note that there are some explanatory texts on larger screens.

plurals
  1. POFacebook-PHP-SDK: api('/me') not working, very strange
    text
    copied!<p>Here is my code:</p> <pre><code> $session = $facebook-&gt;getSession(); var_dump($session);/*it says session is perfectly established*/ try { $uid = $facebook-&gt;getUser(); echo '&lt;br&gt;'; var_dump($uid);/*User id is found*/ $fb_user = $me = $facebook-&gt;api('/me');/*PHP execution doesn't go forward, here it breaks*/ echo '&lt;br&gt;'; var_dump($fb_user);/*PHP execution doesn't come up to here*/ </code></pre> <p><strong>EDITED:</strong> I have print_r the $exception in the catch section and got the following long message:</p> <pre><code>FacebookApiException Object ( [result:protected] =&gt; Array ( [error_code] =&gt; 6 [error] =&gt; Array ( [message] =&gt; name lookup timed out [type] =&gt; CurlException ) ) [message:protected] =&gt; name lookup timed out [string:private] =&gt; [code:protected] =&gt; 6 [file:protected] =&gt; /home/abusadat/public_html/.../facebook.php [line:protected] =&gt; 614 [trace:private] =&gt; Array ( [0] =&gt; Array ( [file] =&gt; /home/abusadat/public_html/.../facebook.php [line] =&gt; 575 [function] =&gt; makeRequest [class] =&gt; Facebook [type] =&gt; -&gt; [args] =&gt; Array ( [0] =&gt; https://graph.facebook.com/me [1] =&gt; Array ( [method] =&gt; GET [access_token] =&gt; ******...****** ) ) ) [1] =&gt; Array ( [file] =&gt; /home/abusadat/public_html/.../facebook.php [line] =&gt; 539 [function] =&gt; _oauthRequest [class] =&gt; Facebook [type] =&gt; -&gt; [args] =&gt; Array ( [0] =&gt; https://graph.facebook.com/me [1] =&gt; Array ( [method] =&gt; GET ) ) ) [2] =&gt; Array ( [file] =&gt; /home/abusadat/public_html/.../facebook.php [line] =&gt; 492 [function] =&gt; _graph [class] =&gt; Facebook [type] =&gt; -&gt; [args] =&gt; Array ( [0] =&gt; /me ) ) [3] =&gt; Array ( [file] =&gt; /home/abusadat/public_html/.../fb-connect.php [line] =&gt; 31 [function] =&gt; api [class] =&gt; Facebook [type] =&gt; -&gt; [args] =&gt; Array ( [0] =&gt; Array ( [0] =&gt; Facebook Object ( [appId:protected] =&gt; ******...****** [session:protected] =&gt; Array ( [access_token] =&gt; ******...****** [base_domain] =&gt; abusadat.com [expires] =&gt; 1312567200 [secret] =&gt; ******...****** [session_key] =&gt; ******...****** [sig] =&gt; ******...****** [uid] =&gt; ******...****** ) [signedRequest:protected] =&gt; [sessionLoaded:protected] =&gt; 1 [cookieSupport:protected] =&gt; 1 [baseDomain:protected] =&gt; [fileUploadSupport:protected] =&gt; ) [1] =&gt; _graph ) [1] =&gt; Array ( [0] =&gt; /me ) ) ) [4] =&gt; Array ( [file] =&gt; /home/abusadat/public_html/.../index.php [line] =&gt; 29 [args] =&gt; Array ( [0] =&gt; /home/abusadat/public_html/.../fb-connect.php ) [function] =&gt; include_once ) ) ) </code></pre> <p>I am using SDK version 2.1.2. I have some restriction to use SDK 3 or greater.</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