How to get facebook user info along with post info using graph api -
i trying fetch visitor posts facebook page using facebook graph api. more info see this: https://developers.facebook.com/docs/graph-api/reference/v2.5/page/feed
according documentation, using this: **/{page-id}/tagged?fields=message,id,created_time,from**
fetch public posts in page has been tagged.
i fetching user info using "from" field.
i able post array. here sample response.
{ "data": [ { "message": "sample message text...", "id": "136617136381867_1041817205861851", "created_time": "2016-01-28t12:13:37+0000", "from": { "name": "annu chelladurai", "id": "10152476225064109" } } . . . ] }
i able user id , user name under "from" key.
how can other user info fields "picture", etc.?
finally, got it.. https://developers.facebook.com/docs/graph-api/using-graph-api#fields
we can use nested requests, explained in above document.
so request modified **/tagged?fields=id, created_time, message, from{id, name, picture, location }**
and works charm. give me user info , picture url also.
{ "data": [ { "id": "136617136381867_1042310465812525", "created_time": "2016-01-29t08:14:32+0000", "message": "dear sir, \ "77000002 term debit card adj 18-01-16\" can explain why charge?and deduction happend more 30 times having hdfc salary / c 01331610161892, in account rs11 .24 charged 30 times as\ "77000002 term debit card adj 18-01-16\" same description. out prior information charging. illegal have not mentioned type of deduction where. pleaseget me possible.else have close service taking hdfc unwillingly have loan hdfc have salary account in hdfc using hdfc debit card applied credit card too.. ", "from": { "id": "785918218185264", "name": "arun gupta", "picture": { "data": { "is_silhouette": false, "url": "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xlp1/v/t1.0-1/p50x50/1725162_823511061092646_1294656835996703680_n.jpg?oh=81e21c67e4b01f6b60784749827090d3&oe=573fe3c5&__gda__=1462383820_126055db9c94eb67294e2d73d4d46dd3" } } } } . . . ] }
hope, someone... :)
Comments
Post a Comment