Facebook Graph API - Page Post Location -
is possible place page post?
the graph api documentation post object says there place field has place id, name, longitude, latitude, etc.
here steps followed test this:
- in facebook ui, posted page location enabled
- using graph api, read page posts (https://graph.facebook.com/{page_id}/feed?access_token={token}&since={startdate}&until={enddate})
- i observed json response contained post , no place field present.
thanks help!
i know old post, can location information using ?fields=place
option when querying specific post details.
here code i'm using fetch posts , location facebook page. can replace /posts
/feed
example
fb.api('/{page_id}/posts', function(response) { if (!response.error) { var posts = response.data; (i = 0; < posts.length; i++) { var post = posts[i]; fb.api('/' + post.id + '?fields=place', function(response) { if (!response.error && response.place) { post.place = response.place; } console.log(post); }); } } });
you can use method ?fields=attachments
pictures or videos attached post.
hope helps 19 months later :]
Comments
Post a Comment