No photos (count == 0) in most recent checkin that returned after requesting complete user object - foursquare

When I request the complete user it has most recent checkin object with photos.count == 0 but that is not true. Is it known bug?

Writing in this as my question is related.
This is my foursquare user id 62901880
Question related to foursquare checkin workflow:
I tried checkin multiple times to a location with Shout and Photo. I don't see picture showing up every time. Is this internal workflow to not associate photo with checkin conditionally.
a. https://foursquare.com/banjoinc/checkin/5213c82c11d218279cec4623 does not show photo on UI
b. https://foursquare.com/banjoinc/checkin/5213b59f11d2943dcf21e138 shows picture.
Question related to /v2/checkins/recent api endpoint:
a. I get a photo count of zero with some checkins containing photo
https://foursquare.com/facher/checkin/5212cae9498e2a1f77f9fa3a checkin while fetching response from above endpoint did not had any photos earlier using cron job. Is it possible ?
Question related to /v2 endpoints in general:
There are 2 types of objects Compact and Complete documented with all endpoints. Is there an option that could be passed to fetch Compact or Complete objects.
Please let me know if you need more info

Related

how to get destination info(bank and card details) on stripe

Let's say I'm getting payouts information https://stripe.com/docs/api/payouts/list
I want to get the destination info, so if we take the example from the docs:
I want the details from that destination, I don't mean the specific details like the exact credit card number, but the info when going on the page itself, this one:
It's not working listing the banks accounts https://stripe.com/docs/api/customer_bank_accounts/list , I'm getting zero results when list them all
I'm using Golang library but I think this solution can be solved by others programming languages
I'm also using expandable fields but I get blank results on bank_account and card details
what is interesting however, is when debugging the page, they make request to v1/payouts/{id} with expand[]: balance_transaction and the returned data contains the bank information, but when I do it with their API, that info is not returned back
The Payout destination is expandable, meaning you can have it replaced with the full object by sending you request with expand[]=destination or for a list command data.destination.

Foursquare api doesn't return correct checkins information

I was tested foursquare api to use it in future projects and faced a strange problem.
I will explain it in example.
You check in via Swarm app to the place 1 and call venue here now endpoint
https://api.foursquare.com/v2/venues/559bac8f498effd9368131f6/herenow?v=20160606&oauth_token=<token>
you receive correct data, your user is displayed in items array field
"response":{"hereNow":{"count":2,"items":[{"id":"583ede91a36ecd3aeee51647","createdAt":1480515217,"type":"checkin","timeZoneOffset":120,"user":{"id":"355625527","firstName":"Dima","gender":"male","relationship":"self","photo":{"prefix":"https:\/\/irs0.4sqi.net\/img\/user\/","suffix":"\/blank_boy.png","default":true}},"likes":{"count":0,"groups":[]},"like":false},{"id":"583ede0a02b60e59094ddbc5","createdAt":1480515082,"type":"checkin","timeZoneOffset":120,"user":{"id":"43963436","firstName":"Ayhan","lastName":"B","gender":"male","photo":{"prefix":"https:\/\/irs0.4sqi.net\/img\/user\/","suffix":"\/43963436-UWAYC333GLM2YQ4H.jpg"}}}]}}
Then you check in to place 2 and call same endpoint. The check in data is correct, your user is in items array.
But when you check in back to place 1, your user are not included in items array
"response":{"hereNow":{"count":1,"items":[{"id":"583ede0a02b60e59094ddbc5","createdAt":1480515082,"type":"checkin","timeZoneOffset":120,"user":{"id":"43963436","firstName":"Ayhan","lastName":"B","gender":"male","photo":{"prefix":"https:\/\/irs0.4sqi.net\/img\/user\/","suffix":"\/43963436-UWAYC333GLM2YQ4H.jpg"}}}]}}
Instead foursquare thoughts that you are still checked in to place 2.
Also when you check in recent endpoint it will return that your recent check in is to place 1
"response":{"recent":[{"id":"583ee16ed8b0ed757138ec10","createdAt":1480515950,"type":"checkin","timeZoneOffset":120,"user":{"id":"355625527","firstName":"Dima","gender":"male","relationship":"self","photo":{"prefix":"https:\/\/irs0.4sqi.net\/img\/user\/","suffix":"\/blank_boy.png","default":true}},"venue":{"id":"559bac8f498effd9368131f6","name":"Львiвськi пляцки","contact":{"phone":"0936567878","formattedPhone":"093 656 7878","facebook":"288574604603052","facebookUsername":"lvivskipljacky","facebookName":"Львівські пляцки"},"location":{"address":"вул. Богдана Хмельницького, 10","lat":50.44546701910413,"lng":30.51702892776601,"labeledLatLngs":[{"label":"display","lat":50.44546701910413,"lng":30.51702892776601}],"postalCode":"01001","cc":"UA","city":"Kyiv","state":"Kyiv City","country":"Ukraine","formattedAddress":["вул. Богдана Хмельницького, 10","Kyiv, 01001"]},"categories":[{"id":"4bf58dd8d48988d16a941735","name":"Bakery","pluralName":"Bakeries","shortName":"Bakery","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/food\/bakery_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":2782,"usersCount":1890,"tipCount":75},"url":"http:\/\/www.fest.lviv.ua\/uk\/restaurants\/lvivskipljacky\/","allowMenuUrlEdit":true,"beenHere":{"unconfirmedCount":0,"marked":false,"lastCheckinExpiredAt":0},"specials":{"count":0}},"source":{"name":"Swarm for Android","url":"https:\/\/www.swarmapp.com"},"photos":{"count":0,"items":[]},"posts":{"count":0,"textCount":0},"likes":{"count":0,"groups":[]},"like":false,"comments":{"count":0},"isMayor":false}]}
Did anyone also face this problem too? Or does foursquare api have some limitation for check-ins? I searched though web about it, but cannot find any useful information
A user will show in the venue "Here Now" for 3 hours after they checkin OR until they checkin at another venue. In your example, a user will not appear in Place 1s "here now" if their checkin pattern is Place 1 -> Place 2 -> Place 1. I'm not sure if this is a bug or done intentionally as a quality control.

Missing tags from comments in media received from Instagram API

When I pull media using either the user or tag endpoint, the received media not always contains all tags for a post. This seems (we are still in sandbox mode) to be the case when the tags are contained in comments BUT not always.
E.g: Requesting tag "arkiromantix" (https://api.instagram.com/v1/tags/arkiromantix?access_token=[access_token]).
Returned data contains among others post with id 1192868766714482828_38257867 which lists the requested tag under tags and post with id 1218885626018570787_210152727 which does not.
But with both posts the tag in question was added in a comment not in the caption.
My questions would be:
Is there a way to assure getting all tags (from caption and authors comments) when pulling media from the Instagram API? (For now I am requesting the comments for each media, which increases the amount of requests the app uses considerably). And if not:
Is there a rule by which Instagram decides when they return all tags (from caption and comments) and when not? (So i can at least reduce the amount of requests)
It seems that tags in comments count as tags on the gram itself if and only if the comment was written by the user that posted the image. This SO question deals with a related issue (i.e. retrieving recent grams with a given hashtag doesn't actually sort by post date of the gram if the hashtag is in a comment made by the gram's poster, but instead by post date of that comment, in that case). See in particular this comment.
I can confirm this (undocumented!) sorting quirk from personal experience from the past two days ... this sort of thing really makes work interesting.

Instagram api: how to get photos containing like?

in my application, i enter a user name and get his photo.
(To get photos, i use: https://api.instagram.com/v1/users/3/media/recent/?access_token = ...)
Request returns only 20 pictures, how to get all photos user?
I want to get photos of this user which contain his likes.
How can this be done?
I have an idea to get all the pictures that have user and check each pictures does it have his like ?!
But I get only the data for the four member who delivered Like, although photo has 50 likes. (See the screenshot below). Why so ? How to fix it ?
Thanks for the help.
It's a two step process:
1) Perform a GET request to /users/user-id/media/recent inorder to get the most recent media published by a user.
2) Then perform a second GET request to /media/media-id/likes in order to get a list of users who have liked this media.
At this point you can record all the media-id's which contain likes by the specific person you want.
Here is the API for instagram users:
http://instagram.com/developer/endpoints/users/
Here is the API for instagram likes:
http://instagram.com/developer/endpoints/likes/
As for getting the entire history, I apologize but I'm unclear as to how to go about doing more than what they provide.
Please let me know if you have any questions!

Instagram: Get photos from a tag after a specified photo

I'm working on an instagram scraper for something and I'm trying to figure out if it's possible to get all photos for a tag that have an id or timestamp later than the last one I have.
The instagram API docs are useless in that they don't have any real info on pagination (which I presume I'll have to abuse).
Does anyone have any ideas?
I've been slogging through the Instagram API for the last couple of days so here's my 2 cents worth:
As far as I can see it if you call the api with /tags/tag-name/media/recent it only return a list if items. If the amount exceeds about 25 you have to make another request with the pagination value returned in the previous request.
In order to gain some control I am initially iterating through all images and storing the results (just the URL not the actual image) to a database. Now I can manipulate however I want. When I feel like updating (I'm doing it manually now but could be a cron job or use the real-time api) I re-read all the images, compare to what I have in my DB and add possible new images. My app then reads out the url and info from my DB (which btw is a heck of a lot faster than going through the instagram api, which will only return about 25 images per request - regardless of any 'count' parameter value you put in the request url) and displays it.
I am developing this for a client who is afraid of people posting nsfw or whatever pics using their dedicated hashtag (for a contest) - with the above set up I can offer them an interface where they can check and mark images that are then displayed in the app.
One thing to watch out for is when a user deletes his picture; you will have to find a way to check for this. Currently (since I'm lazy) I load all images and use jquery to check for an error loading the image. If there is one I delete the image from the DB (via ajax).
I'm not sure the pagination is going to help you: as far as I can see the pagination response has no relation to the id's of the actual image objects on each page - so theoretically a pagination id that jumps to a certain page (i.e. date) might not work tomorrow if enough images have been deleted in the mean time.
to get all images instead of latest 20, just append &count=-1 to your api call - it's that simple.
In either case, there is a timestamp on each json object - or if you prefer, you can use max_tag_id
check out my post here: there any way to show more than 20 photos of the instagram API?
* Update April 2014: count=-1 is no longer available.

Resources