Note that there are some explanatory texts on larger screens.

plurals
  1. POGraph api not working correctly over phpfog, access token refresh required?
    primarykey
    data
    text
    <p>This is a problem am facing for long now also asked a <a href="https://stackoverflow.com/questions/9776935/unable-to-retrieve-user-name-through-graph-api-after-shifting-to-another-server">question</a> regarding this before but didn’t get it solved, but by now I’ve refine my case, for the latest the case is:</p> <p>I am trying retrieving username, emailing and publishing photos from the code through graph api, the code was working fine when It was on some other server but recently I moved the application to phpfog and since then am facing this weird problem.</p> <p>As it seems the problem is only with the information and functions where where access token is required (full name, email, publishing photos) other information such as profile picture etc. can still easily be retrieved.</p> <p>The same code works perfectly fine on other server but as soon as I bring it phpfog it stop working in this weird way.</p> <p><em>Is there a need to refresh access_token if yes, how can I do that?</em></p> <pre><code>try { $userId = $_POST["user_id"]; $oauth_token = $_POST["oauth_token"]; $userName = json_decode(file_get_contents('https://graph.facebook.com/' . $userId)) -&gt; name; $userGender = json_decode(file_get_contents('http://graph.facebook.com/' . $userId)) -&gt; gender; $userPpicture = json_decode(file_get_contents('http://graph.facebook.com/' . $userId)) -&gt; picture; } catch(Exception $e) { echo $e -&gt; getMessage(); echo "&lt;br&gt;"; } </code></pre> <p>Kindly get me through this. Thankyou.</p>
    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.
 

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