Skip to content

Instantly share code, notes, and snippets.

@m4tthumphrey
Created June 27, 2013 08:55
Show Gist options
  • Save m4tthumphrey/5875038 to your computer and use it in GitHub Desktop.
Save m4tthumphrey/5875038 to your computer and use it in GitHub Desktop.
<?php
set_time_limit(0);
$fields = array(
'id',
'name',
'first_name',
'middle_name',
'last_name',
'gender',
'locale',
'languages',
'link',
'username',
'age_range',
'third_party_id',
'installed',
'timezone',
'updated_time',
'verified',
'bio',
'birthday',
'cover',
'currency',
'devices',
'education',
'email',
'hometown',
'interested_in',
'location',
'political',
'payment_pricepoints',
'favorite_athletes',
'favorite_teams',
'picture',
'quotes',
'relationship_status',
'religion',
'security_settings',
'significant_other',
'video_upload_limits',
'website',
'work'
);
$url = 'https://graph.facebook.com/x?';
$auth_url = $url.'access_token=xx&';
echo '<h2>Public</h2>';
foreach ($fields as $field) {
$data = file_get_contents($url.'fields='.$field);
$json = json_decode($data);
echo '<h3>'.$field.'</h3>';
echo '<pre>'.print_r($json, 1).'</pre>';
}
echo '<h2>Authed</h2>';
foreach ($fields as $field) {
$data = file_get_contents($auth_url.'fields='.$field);
$json = json_decode($data);
echo '<h3>'.$field.'</h3>';
echo '<pre>'.print_r($json, 1).'</pre>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment