I'm developing application using Graph API. It reads page's photo albums, but they are returned ordered by time they were uploaded even though their order was changed on Facebook by page admin (drag & drop style).
Is there any possibility to get albums ordered as admin intended?
Neither http://developers.facebook.com/docs/reference/api/album/ nor http://developers.facebook.com/docs/reference/fql/album/ expose a sort order field. I'd suggest filing a bug at http://developers.facebook.com/bugs and hope facebook thinks it's cool enough to include in a future release.
Related
I'm trying to build a app that gets info from the Spotify API but since I don't have the Spotify ids I want to grab the ids using search queries.
I wanted to just try it so I tested it with an album called yellow and a band called SCANDAL. However when I query, say, https://api.spotify.com/v1/search?q=album:yellow+artist:scandal&type=album it comes up with nothing. However when I Google the band, I got an artist id: 7hTZwqQILVH4bAbN67CeEz from the URL.
using the get albums query(https://api.spotify.com/v1/artists/7hTZwqQILVH4bAbN67CeEz/albums?album_type=album&limit=5) it shows that the album exists but the original query didn't find it. Am I doing something wrong or does it only work with more popular artists (I tried other albums and it was fine)?
There doesn't seem to be anything wrong with your query. I think you are hitting a bug.
Bug reports for Spotify Web API can be found in Github issues
According to this bug:
https://github.com/spotify/web-api/issues/194
setting no market parameter will make it default to US. Your query seems to confirm this bug. Since SCANDAL Yellow is not available in the US, you will not see it in the results. If you add market=SG for instance, it will show up.
I am using soundcloud API for a project but the problem is I get remix of the original songs or cover version, its okay if I get remix and cover version but is there any mechanism that the original one comes as first song in the search result ? I tried searching on Google and read the API documentation but found nothing in this context.
The track object in soundcloud's API actually has the track_type property which has possible values of 'original' and 'remix' among other things. Sadly like most valueable metadata the track object has, content providers neglect to fill the field. So unless content providers start putting more effort into filling in the metadata fields the only option you have is giving songs priority based on words in the title or tags.
I'm looking to somehow tell users to upload a picture and do something, either tag or # our company so we are notified in real time, i just need to fetch the url of the photo that was uploaded and tagged or # or ANYTHING.
the hashtag search doesn't seem to work correctly, i've tried multiple hashtags and they wont retrieve them in any type of real time or at all.
the real-time subscription only notifies me that there is a new photo tagged that i subscribed to, so i have api search for a list of new media with that tag, which goes back to point 1, its not accurate or reliable.
so do i have any options at all on instagram?
If not do I have any options on facebook? any real time keyword search to grab the url of the photo they uploaded with a unique tag.
Check out https://github.com/chapmanu/hummingbird, it might be what you're looking for.
My experience with the Instagram Real-Time API is, that it is rather reliable.
When you get a real-time ping and then call the endpoint for your hashtag, the results are ordered newest first.
You can then paginate until you hit the last known result.
Maybe this tutorial helps: http://www.mtrinitaria.com/mykhel/tutorial-instagram-real-time-photo-update-api-with-php/
I'm running a contest on the web where the image with the most likes wins. It's tiresom having to go through 900 images manually so what I want to do is, sort all images with the tag lets say #computer after the amount of likes, with the most liked pics on top. I have searched the net like crazy for some program or site that does this (ExtraGram, gramhoot, statigram, webstagram) but none offer to sort by amount of likes and it drives me INSANE! It's a really relevant request.
I've tried istafeed.js but it doesn't include all images, actually it leaves out the ones with the moest likes which defies the purpose.
There's nothing I know of in the Instagram API that sends back media sorted by likes in advance. I don't think there's a tool to do this either, but writing one is relatively simple IMO and I've done it before for a contest specifically.
The simplest thing to do is to do the following:
Use the Instagram API (via a library or pure REST) to query by tag. For instance, if you only care about the most recently tagged media or you want to process by date, you can use the [/tag/tag-name/media/recent][1] enpoint.
Page through each result page by processing the next_max_id/next_max_tag_id.
Collect the results locally into a database. You will receive the "like" count for each media item. You will have to update the data if you want to track the likes over time.
Sort the results using your database or if it's a small result set, you could skip #3 and just sort in memory.
If you need to refresh the results, you need to subscribe to the Tag via the API. You can give Instagram a URL to then push updates, and then you'll have to retrieve 1 or media items and update them in your database accordingly.
You will of course need to register your application with Instagram to get an API key if you want to do this. Then you can either send them your client_id or use OAuth.
The best way to achieve this is to pull the photos in and then sort them programmatically based on the likes numeric value. I've designed a plugin that does this automatically for you for anyone interested.
Instagram Journal
I'm trying to get one good photo result on the Foursquare API which are representative of a venue.
Currently I'm using:
https://api.foursquare.com/v2/venues/VENUE_ID/photos?group=venue&limit=1
This works, but it appears that the photo filtered is always the most recently added photo for that venue, which is not necessarily always the best. There also doesn't seem to be anyway to any sort differently (by rating etc.). I would prefer that the photo that appears be always the first photo result on the foursquare website for the venue, whatever that may be.
I was playing around with the suffix, and I found that if instead of
photos?group=venue&limit=1
I just put
photos?&limit=1
I would get the results I am looking for (the first photo that appears on the website for that venue). However, on the documentation it says that having a group value is required. Obviously, I don't want to set behavior based on a bug, but it works.
So, is it a bug? Or is it just a problem with the documentation that says group is required. Any help would be appreciated.
Thanks!
That's probably a bug you're encountering, but to get the first photo on the venue page, you can query the venues detail endpoint and then use the photo object in the venue result: https://developer.foursquare.com/docs/explore#req=venues/40a55d80f964a52020f31ee3