how post on facebook location(using latitude , longitude) using javascript sdk? can't find example post location.
will open graph action creation required posting location in post?
also, possible share url of page , instead make use of open graph tags on page share location details use in facebook post?
javascript code create post text message:
var body = 'reading js sdk documentation'; fb.api('/me/feed', 'post', { message: body }, function(response) { if (!response || response.error) { alert('error occured'); } else { alert('post id: ' + response.id); } });
an example in documentation says:
you can make post request locations edge following paths: /{page_id}/locations when posting edge, location created.
does mean location post cannot created using graph api user's feed?
reference:
- https://developers.facebook.com/docs/javascript/reference/fb.api
- https://developers.facebook.com/docs/graph-api/reference/location/
edited:
able find example create post location attached answered here:
fb.api('/me/feed', 'post', { name: 'somename', message: 'somemessage', place: '106039436102339' // id tallinn, estonia }, function (response) {});
though next question is, how find location id using latitude , longitude?
you can find location id https://graph.facebook.com/search?q=karachi&type=page&access_token=yourtoken
give list of places match karachi.
Comments
Post a Comment