How To Get Status Update Posted By Page - Facebook Graph API -



creating desktop application in needs grab post_id of status updates posted page (no photos, videos , other stories/types.) i'm using type parameter task easily.

https://graph.facebook.com/{username or id of page}/posts?fields=object_id,type&limit=250&access_token={my access token} 

the giving url returning list of posts it's types , post id

my page updated status {  "type": "status",  "id": "493341197400693_627621933972618",  "created_time": "2014-04-05t18:31:58+0000" }, 

it's working fine problem post in list type=status not status update it's story i.e "my page commented on photo"

my page commented on photo {   "type": "status",   "id": "493341197400693_626576670743811",   "created_time": "2014-04-03t11:27:22+0000" }, 

how confirm either status update or story if type of both response "status". want ignore my page commented on photo or my page likes photo etc, suggestion?

sorry bad english.

you can 'message' field. status should have 'message' field associated it, whereas story 'my page likes photo' should not have 'message'. here sample php code.

if (array_key_exists("message", $post))     //is status 

modify graph call include message, so.

https://graph.facebook.com/{username or id of page}/posts?fields=object_id,type,message&limit=250&access_token={my access token}


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -