Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Try this code :</p> <pre><code>&lt;?php session_start(); $facebook_appid = "facebook_appid"; // Facebook appplication id $facebook_secret = "facebook_secret"; // Facebook secret id $redirect_uri = "https://localhost/facebook_page/events.php"; // return url to our application after facebook login ## should be SAME as in facebook application $scope = "user_photos,email,user_birthday,user_online_presence,offline_access,manage_pages,publish_stream,user_events,friends_events"; // User permission for facebook $code = $_REQUEST["code"]?$_REQUEST["code"]:""; if(empty($code)) { $_SESSION['state'] = time(); // CSRF protection $dialog_url = "https://www.facebook.com/dialog/oauth?client_id=". $facebook_appid . "&amp;redirect_uri=" . urlencode($redirect_uri) . "&amp;state=". $_SESSION['state'] . "&amp;scope=".$scope; header("location:".$dialog_url); } if($_SESSION['state'] &amp;&amp; ($_SESSION['state'] == $_REQUEST['state'])) { $token_url = "https://graph.facebook.com/oauth/access_token?". "client_id=" . $facebook_appid . "&amp;redirect_uri=" . urlencode($redirect_uri). "&amp;client_secret=" . $facebook_secret . "&amp;code=" . $code; $response = @file_get_contents($token_url); $params = null; parse_str($response, $params); echo $params['access_token']; echo "&lt;br&gt;"; //$offer_url = "https://graph.facebook.com/".$dt-&gt;id."/conversations?access_token=".$dt-&gt;access_token; //$off = @file_get_contents($offer_url); //$dto = json_decode($off); //echo "&lt;pre&gt;"; //print_r($dto); } ?&gt; </code></pre>
    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.
    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