I have an application that has access to user feeds. I have a real-time setting for the application in this tutorial:
http://developers.facebook.com/docs/reference/api/realtime/
Essentially, when a user submits an action to their channel, I successfully receive information from Facebook for my feedback. The information is as follows:
{"object":"user","entry":[{"uid":"629498222","id":"629498222","time":1361371026,"changed_fields":["feed"]}]}
My problems begin there. Each tutorial that I read in real time ends exactly, without explaining how to get to the actual update data.
Therefore, I am trying to use all kinds of things, in particular the following code snippet, to get the user channel in order to access the last message. This is in my php callback file:
$app_token_url = 'https://graph.facebook.com/oauth/access_token?client_id='
.$app_id.'&client_secret='.$app_secret
.'&grant_type=client_credentials';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $app_token_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$res = curl_exec($ch);
parse_str($res, $token);
if (isset($token['access_token'])) {
curl_setopt($ch, CURLOPT_URL, 'https://graph.facebook.com/629498222/feed'
.'?access_token='
.$token['access_token']);
$res = curl_exec($ch);
if ($res && $res != 'null') {
print_r($res);
}
}
, . , , . , . ?
. , , .