Skip to content

Instantly share code, notes, and snippets.

<?php
$app_id = "YOUR_APPLICATION_ID";
$app_secret = "YOUR_APPLICATION_SECRET";
$post_login_url = "YOUR_POST_LOGIN_URL";
$code = $_REQUEST["code"];
//Obtain the access_token with publish_stream permission
if(empty($code)){
$dialog_url = "http://www.facebook.com/dialog/oauth?client_id="