I am developing location based app for bixby, where i do need user's location information like latitude, longitude and timezone. However, I am able to get latitude and longitude but unable to get timezone. Please let me know what node should i use to get that information?
Its in the variable $vivContext. More details here: https://bixbydevelopers.com/dev/docs/dev-guide/developers/actions.js-actions#passing-user-context-information
Related
I wrote a mini instagram wordpress plugin for my cafe's website that shows the photos taken there on our homepage. You can see it in action here: dem-istanbul.com
However, since instagram now uses facebook places instead of foursquare, the location id I'm using is outdated, plus I want to add a second place as we have opened a new branch. I've been using this code to list the photos:
$result = fetchData("https://api.instagram.com/v1/locations/83910054/media/recent/?access_token={$accessToken}&count=8");
However, when I want to add a second location, I am unable to find the location-id as it now fetches data from facebook places. This value had newly been added to the Instagram API, however I'm at a loss on using it:
https://api.instagram.com/v1/locations/search?lat=48.858844&lng=2.294351&access_token=ACCESS-TOKEN
Search for a location by geographic coordinate.
PARAMETERS:
DISTANCE Default is 1000m (distance=1000), max distance is 5000.
FACEBOOK_PLACES_ID Returns a location mapped off of a Facebook places id. If used, a Foursquare id and lat, lng are not required.
FOURSQUARE_ID Returns a location mapped off of a foursquare v1 api location id. If used, you are not required to use lat and lng. Note that this method is deprecated; you should use the new foursquare IDs with V2 of their API.
LAT Latitude of the center search coordinate. If used, lng is required.
LNG Longitude of the center search coordinate. If used, lat is required.
FOURSQUARE_V2_ID Returns a location mapped off of a foursquare v2 api location id. If used, you are not required to use lat and lng.
From what I understand, I should now be able to use facebook places id to list images, but I'm not sure where to get it.
Sorry if that sounds complicated, but I'll be very happy if anyone can help me with this. Thanks very much in advance.
You can find your location facebook place id, foursquare id or by geographic coordinate.
Your second cafe is probably dem bebek. You can get it's () id via http://graph.facebook.com/DemBebek .
By the way you can get your second cafe's medias via https://api.instagram.com/v1/locations/385502821/media/recent
I guess the title is pretty self-explanatory. I want to get all the checkins in a certain area given the latitude and longitude.
All I've been able to find is https://developer.foursquare.com/docs/checkins/recent and https://developer.foursquare.com/docs/venues/venues, but neither of them are useful for me.
I'm pretty sure there has to be a way, but I can't find it.
Use this api and filter by "hereNow" count for each venue, this will give you count of people currently in that location
https://api.foursquare.com/v2/venues/search
more details here: https://developer.foursquare.com/docs/venues/search
I am grabbing photos from my 2 flickr groups using the API method flickr.groups.pools.getPhotos. This is ok but i'd like to actually return the town name rather than just the geo location. Does anybody know of an alternative method to grab my images including the geo location, town name, and the group that they are in? I'd rather not make multiple API calls per image.
Thanks
So it appears there is no way of doing this. I had to call flickr.groups.pools.getPhotos then flickr.photos.geo.getLocation on each image to get its location. Not the best solution but it is then being cached into a db for improved performance, then only called once every 30 mins.
You can get location attributes by adding "geo" parameter to extras argument for flickr.groups.pools.getPhotos request.
extras (Optional)
A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are: description, license, date_upload, date_taken, owner_name, icon_server, original_format, last_update, geo, tags, machine_tags, o_dims, views, media, path_alias, url_sq, url_t, url_s, url_q, url_m, url_n, url_z, url_c, url_l, url_o
In response you will receive geo latitude and longitude for each photo from group.
We are planning to use foursquare api to get venue in a particular city. I want data of all the food outlets in a particular city. I have managed to get the categories list but not sure how to get venues from that particular category in a particular city or area.
Please share some tutorials or document which i can check out.
One way of doing what you want will be using the Venues Platform for browsing according to a category ID.
Look at venue search API reference.
Example of using it:
I know that 4bf58dd8d48988d11f941735 is nightlife (just picked the first one I saw)
So I will call the API (the ll is someplace in New York):
https://api.foursquare.com/v2/venues/search?ll=40.7268,-73.9972&categoryId=4bf58dd8d48988d11f941735&limit=50&intent=browse&radius=1500&your ids/oauth
Or use the explorer to see results right away.
Important, read the search API and the parameters used here to alter behavior to your needs.
Another very important thing, the API parameters are case sensitive!! (so if they want categoryId, categoryid will not work :) )
I have a j2me application and it needs to get the name of the current timezone and send it off to the server.
However, the only format that I seem to be able to get the phone to give me is "GMT-5:00". What I want the application to do is return the timezone's name (EST, PST, etc.)
I iterated over the string[] returned by TimeZone.getAvailableIds() and it has a list of all the time zones in the format that I want them in. (EST, CST, 'Pheonix, USA', 'Europe/Samara', etc.)
Any ideas on how to get the timezone's name instead of as an offset from GMT+0? Thanks in advance.
TimeZone.getID() is what you're looking for; it should return one of the values returned by TimeZone.getAvailableIDs().
you can make an array in which you'll put all your time zone ids. then just add 12 to the returned time zone offset and you can use that as an index for calling time zone names from your array.