Skip to content

Instantly share code, notes, and snippets.

@tdickie
Created March 12, 2013 22:32
Show Gist options
  • Save tdickie/5147707 to your computer and use it in GitHub Desktop.
Save tdickie/5147707 to your computer and use it in GitHub Desktop.
<?php
$profile_id = "pepsi";
//App Info, needed for Auth
$app_id = "12335621736213";
$app_secret = "a112basbsadjbj2h19213jkqwqwkjekjqwe";
//retrieve a new Auth token
$authToken = file_get_contents("https://graph.facebook.com/oauth/access_token?type=client_cred&client_id={$app_id}&client_secret={$app_secret}");
// fetch profile feed with the Auth token appended
$data['feed_data'] = file_get_contents("https://graph.facebook.com/{$profile_id}/feed?{$authToken}");
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment