How to get purchase link of all songs from itunes - itunes

I am working on an music app by using which we can listen,buy(iTunes),share the songs but I have no idea how to get the purchase link of songs. I'm using
https://itunes.apple.com/search?term=let+it+go&media=music
to get information but the purchase link not provide in it.

I know that to redirect to an album page the URL are like this: https://itunes.apple.com/us/album/id{collectionId}, with {collectionId} provided by the search API.
Now I think that to get a certain song the URL would be: https://itunes.apple.com/us/album/id{collectionId}?i={trackId}.
Example: https://itunes.apple.com/us/album/id728903889?i=728904065 for the song "Let it go", by Demi Lovato.

The link to the track is provided in each result's trackViewUrl.
For example, the first trackViewUrl in the file you provided is https://itunes.apple.com/us/album/let-it-go/id948749743?i=948749751&uo=4

Related

How to get other people or page video thumbnail from facebook?

is there a way you can get video thumbnail from another people video or post?
I tried searching in google and stackoverflow and all i found is getting your own video thumbnail which is working fine by using https://graph.facebook.com/v11.0/443055553744880/thumbnails?access_token=my_access_token but it is not working if i change the video_id to other people video_id (443055553744880 is the video_id). I want to get any public video thumbnail regardless of who post it, not just my own video. Is there anyway to do that?
Thanks in advance
No, that is not really possible.
For access to videos on pages you do not have admin access to, you would need the Page Public Content Access feature - only the purpose of that is to “Provide competitive benchmark analysis”, so it is probably unlikely you would get it approved for other purposes such as to show videos on your site.
And for access to any content on user profiles, you would need the individual user’s permission first.
If you just want to show the videos somewhere, then you can use the Embedded Video & Live Video Player for that, or the oEmbed endpoints.

youtube's api for app use

Can anyone guide me on how to get youtube's API's to play songs inside the app ?
I need to implement a view with UISearchBar where the user searches for any video on youtube (channel etc .. ) and the results are filtered in a UITableView with the thumbnail, title, and description.
The user gets to choose a video and this video gets opened in another view.
I just need the search because i've been searching for a week and i can't find any result.
PLEASE help.
Thanks.
Youtube api has a good tutorial page for their iOS helper library that you can find here.
In order to retrieve youtube videos using a search string, you'll need to use the youtube api.
You might have to make a get request to
GET https://www.googleapis.com/youtube/v3/search
The required parameters include
part -The part parameter specifies a comma-separated list of one or
more search resource properties that the API response will include.
Set the parameter value to snippet.
You may want to add the search string parameter as well (q), if you are searching for a particular string .
For example a query looks like:
GET https://www.googleapis.com/youtube/v3/search?part=id&q=hello&key={YOUR_API_KEY}
and you get the JSON response containing the youtube ids for the videos matching the search string provided.You can see the details here.
This youtube id can then be used to play the video in a Web View according to the iOS helper library.
[self.playerView loadWithVideoId:#"M7lc1UVf-VE"];

How to implement instagrams location search

Please point me to the right directions, I want to implement this on my app:
http://tinypic.com/r/2e6gger/8
The image above came from instagram app after tapping on Add to Photo Map option, 3rd page when adding a new image.
From what I understand so far, core location can give me the exact position of the device but not
the other locations I see on the page above as suggestions.
Thanks
Those location names come from facebook places, you have call the facebook graph API for places and then find the corresponding instagram location id, here is related question with the answer: https://stackoverflow.com/a/26685713/423089
So we decided to use foursquare's api.
Thanks.

Graph API - Photo uploaded by API is not visible

I`m geting the following problem.
Using graph api I can create an album (exactly photo album of my app). There is no problem also to upload photo to already created album (I have aid of this album as result of previous operation). After uploading photo I get also pid of the photo.
The problem starts now at the moment when I would like to get photos of the album. Graph API returns an empty array. Also I don't see any new album when I go to app page. However if I go to wall of my app page, I see this photo on "last added photos" list. I can enlarge uploaded photo, and I even see info that it's located in the proper album. There is another wird thing. If I choose this album, Facebook notice me that it`s an empty album.
I doesn't mean those operations are not done well, because if I request for a particular photo using pid (which I know from upload photo operation) I get a proper result - photo exist. Unfortunately it's really uncomfortable to store all pids of album in data base and perform separated request to each of it.
If the Facebook App is in "sandbox" mode, the images will only be visible to the admin/developers/tester users. Public users will not see the images.
Turning sandbox mode off fixed this issue for me.

Get favorited photos using vk API

I want to download all my favorited photos from VK, but I couldn't find suitable method in documentation. User's faves are not album and it makes troubles. Is there a way to do what I want?
You should use method fave.getPhotos to get pictures available here.
Access items from response and extract picture link from fields photo_807, photo_604, photo_130 or photo_75 dependent on which size do you need.
You can download images using the links extracted.
https://vk.com/dev/fave.getPhotos?params[photo_sizes]=0&params[v]=5.67