Instagram API - FACEBOOK_PLACES_ID - instagram

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

Related

FourSquare API returns venues that I have not called for

We are interested in producing a list of venues in an app that we are building. We call the FourSquare API for this, and we want it to return only venues that fit the parameters we specify in the call. We have specified that we want venues in the category "gay bar", within 100 meters of the coordinates that the call is made from.
When we make the call from coordinates in Oslo, the API returns one gay bar, but does not return two other gay bars that are within 100m of the coordinates (these are in FourSquare's database). Instead, the API returns a set of places that are not in the category we have specified (offices, convention centres, regular pubs, etc). We are obviously not interested in these venues - we are interested in the two venues that the API does not return.
The URL for the call is below. Please, if you can help me understand how to correct this, I would be very grateful.
Ben
https://api.foursquare.com/v2/venues/search?categoryIds=4bf58dd8d48988d1d8941735&ll=59.915286,10.740464&radius=100&limit=15&v=20210826&intent=browse
The documentation suggests that the parameter name is categoryId (not plural). Try that.

Tweepy-Twitter Python : Get trends where no WOEID available

I've reading docs about twitter api's and I know how to get the trends for available countrys with Woeid (where on the world id).
Twitter has a list of countrys for which they can show the trends. When you list the availables places for trends you may notice that not all cities are supported.
My problem is that I need the trends for a country that has not support for its API. The country I need is El Salvador. This country has no support on the API, neither Woeid. But you can go to homepage and you will see the local trends to the right of window.
There is an option: get the latitude, longitude of El salvador and search trough twitter geo API for trends, but it will return you the trends for other country (Guatemala).
So, as far as I searched, using the api is not an option. Is there another way to get the twitter trends from El Salvador?
Ok, I’ve been doing what you need today.
Without being able to do an api call, which yahoo don’t support, go here;
https://www.yahoo.com/news/weather/el-salvador/apopa/apopa-76867
When you search a city, the woeid is added to the address bar.
Eg Apopa, El Salvador is 76867
Type in city names in yahoo weather and get the ones you need.
Not the best solution but should work for what you need.

Colleting a neighborhood in foursquare

im making a app in using the Foursquare API, using their API i can get some places in a neighborhood.
I'm using one like that:
https://api.foursquare.com/v2/venues/explore
?ll=40.7,-74
&limit=50
&venuePhotos=1
Using that API i can take 50 venues around my point, but how can I take more others venues like a second page of that?
You can use the "offset" parameter to query for subsequent pages of results. For example, to get the second page, you would supply "offset=50" to indicate skipping the first 50 results.

Flickr photos by group with location name

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.

Foursquare get venue details

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 :) )

Resources