dimanche 7 décembre 2014

Getting attributes from Facebook Graph Object


Vote count:

0




I am using facebook api with PHP to get comments on a specific post by postID



$request = new FacebookRequest(
$sess,
'GET',
'/xxxxxxxxxxxxxxxxxxxxxx/comments'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();


the result when i do it with graph api is a json file like that



{
"data":[
{
"id": "xxxxxxxxxxxxxxxxxxxxx",
"from": {
"id": "yyyyyyyyyyyyy",
"name": "someName"
},
"message": "commentMessage",
"can_remove": true,
"created_time": "2014-12-06T18:05:03+0000",
"like_count": 0,
"user_likes": false
}
],
"paging": {
"cursors": {
"after": "WTI5dGJXVnVkRjlqZFhKemIzSTZNVFUwTURJMU56Z3dPVFUxTkRjME1qb3hOREUzT0RnNU1UQXpPaTB4",
"before": "WTI5dGJXVnVkRjlqZFhKemIzSTZNVFUwTURJMU56Z3dPVFUxTkRjME1qb3hOREUzT0RnNU1UQXpPaTB4"
}
}
}


how can i get the attributes such as name or message from the $graphObject



asked 2 mins ago







Getting attributes from Facebook Graph Object

Aucun commentaire:

Enregistrer un commentaire