Foursquare API methods upvote / downvote a tip - foursquare

Since Foursquare encourage developers to post API issues on StackOverflow I wanted to ask: Is there a method for upvote or downvote a tip in Foursqaure API? I have checked the Foursqaure API docs but there aren't any new methods added for tips.

You can use the v2/tips/like API to like or unlike a tip.
If 1, like this tip. If 0 unlike (un-do a previous like) it. Default
value is 1.
https://developer.foursquare.com/docs/tips/like
UPDATE:
It looks like Foursquare.com uses an undocumented endpoint v2/tips/vote. You can see how this works by inspecting network traffic to Foursquare.com and upvoting or downvoting tips.
Upvote: https://api.foursquare.com/v2/tips/TIP_ID/vote?vote=1
Downvote: https://api.foursquare.com/v2/tips/TIP_ID/vote?vote=0
Remove vote: https://api.foursquare.com/v2/tips/TIP_ID/removevote
These all need to be POST requests and you'll of course need an oauth token for all of them.

Related

Wants to save Instagram post and comments on post to our domain, is it possible and if possible how?

I have a domain which have a feature to login with instagram a/c, registered users associate their instagram a/c using this process.
Now i want to store/save all post and comments of users they have posted on instagram a/c.
So that i can perform a search on comments and caption of posts.
As fas as my knowledge its not possible by using instagram api thats why i am saving info in my database.
Is there any simple way to perform search ?
Any help will be appreciated.
Thanks
Instagram only gives you 150 latest comments via API, so if you want to search through all comments, you have fetch comments at regular interval and save on server, searching these comments are straight forward, look for substring in the comment items saved. It is kind of tricky on deciding how often you want to check for comments and store, usually mosts comments are posted few minutes after a popular photo is posted. If you do the checks too often, you may reach the API rate limit.
https://api.instagram.com/v1/media/{media-id}/comments?access_token=ACCESS-TOKEN
If you are dealing with less than 150 comments on average, then you can search through it without needing to save on server and can be done all on client side. Just pull the comments using API and do search through the array of comments using javascript.
Picodash allows you to view the latest 150 comments and search any keyword or user, here is screenshot:
I have developed library in php: https://github.com/raiym/instagram-php-scraper
It allows you to get ALL comments from specific post (I have tested with 8 000 comments)
$comments = Instagram::getMediaCommentsByCode('BGY0zB4r7X2', 1500);

How to fetch newest comments to any instagram post in the account?

We're developing a service which helps owners of social accounts to answer questions asked in their social accounts/communities. The issue we're having with Instagram is the following: we obviously have read the open info on endpoints and comments and we do the following: we snatch some X top media of the account, and then fetch the comments from each media to see if there is a new comment there. It works, but.
We have to limit ourselves to certain number of top media to track. If there is an active account, it can easily have 1000s of posts. Ok, the probability of someone commenting on media like #900 is fairly low but still requesting and snatching comments for 1000s of posts seems like just creating unnecessary entropy :) and unnecessary load to server and to instagram too.
We're very sure there should be some way/hidden/secret/private/unofficial endpoint or whatever which gives out just the latest comments regardless of how deep the commented media is in the account.
If anyone knows how to do it, please share. I'd be eternally grateful!
Keep a track of comment count for all posts, and check for the count via media/recent API every hour or so, and then fetch comments using the get comments API for the media that has changed comment count.
media/recent API can be used to get comment count for up to 32 posts with one API call, so this will not reach the API rate limits quickly. This is better than using get comments API for every post to see if there is new comment.
https://api.instagram.com/v1/users/{user-id}/media/recent/?count-32&access_token=ACCESS-TOKEN
API response will have comment count:
"data": [{
"comments": {
"count": 0
},
...
"id": "xxxx",
...
if count has changed the use the id to get comments:
https://api.instagram.com/v1/media/{media-id}/comments?access_token=ACCESS-TOKEN

How can I search Instagram with hashtags via a URL?

On both Facebook and Twitter, you can do a simple search of hashtags on these channels via a URL search, for example,
https://www.facebook.com/hashtag/myhashtag
Can you do the same with Instagram also? I can't seem to figure it out. I did find some API, but that's about all: https://instagram.com/developer/endpoints/tags/
This might be something that Instagram implemented after this question was originally asked, but this currently works:
http://instagram.com/explore/tags/yourhashtag
OR
http://instagram.com/tags/yourhashtag
The latter simply redirects to the former, but it's handy to have a shorter URL in some instances.
You'll find out more about how to customise Instagrams URLs by using endpoints on their API documentation page.
I'm not very familiar with how to use URL parameters and I'd be curious to know if anyone has found a way to filter via URL both by user and hashtag. Meaning that you show everything a specific user has posted with a specific hashtag. Many Instagram plugins allow you to do this at the same time, so one would hope it's possible via URL as well.
There is the instagram public API's tags section that can help you do
this. http://instagram.com/developer/endpoints/tags/
http://iconosquare.com/tag/ is another alternative
For example: http://iconosquare.com/tag/flowers
via https://stackoverflow.com/a/11182218/1085891

Is it possible to post comments on Instagram via API?

There is a POST method for to create comments, but it says the following:
Create a comment on a media. Please email apidevelopers[at]instagram.com for access.
See: http://instagram.com/developer/endpoints/comments/#
So do I have to get whitelisted for to be able to post comments or is the access_token enough?
Yes it is possible to post comments on Instagram via API. You have to get whitelisted now, so you have to email. This was not the case before, you were able to use commenting in api whithout whitelisting, but because of some apps spamming and abusing the comments feature, commenting now has to be whitelisted
See more: https://developers.facebook.com/docs/instagram-api/reference/media/comments#create

Post shout without venue on Foursquare

It used to be possible to post a chekin without a venue, which would result in a "shout" being posted to Foursquare. This has stopped working. Is it possible to do this anymore?
Per this announcement, it's no longer possible: https://groups.google.com/group/foursquare-api/browse_thread/thread/231fcc783f5c592f

Resources