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"];
Related
I want to make an app which shows video from my YouTube channel or from my playlist using using YouTube API..
the app should be like this..
app should display list of all video in playlist and when user click on any video it should be played...
how can i do this app ?
if you know solution please send both java and xml code for this.. or send a link from where i can download source code
Checkout PlaylistItems, it returns all the videos from your playlist.
"A playlistItem resource identifies another resource, such as a video,
that is included in a playlist. In addition, the playlistItem resource
contains details about the included resource that pertain specifically
to how that resource is used in that playlist."
For Java code samples, checkout the Official Youtube api-samples/java for code reference.
I need to set a caption when I share a picture (QR code) from my app integrated with Facebook Messenger.
There is metadata NSString field but I don't see a way how to use it. Did anyone solve that problem?
metadata field You can see that we're passing options to the share
method. This contains two fields we want to send back to Messenger:
metadata and contextOverride.
The metadata field takes a NSString and is optional. It can be used to
give information about the content being shared. For example, you can
store a serialized JSON string. This is useful during replies as this
data is passed back to your app.
https://developers.facebook.com/docs/messenger/ios#bp_using_metadata
The metadata is meant for you, as a developer, to use. For example, when a user creates an image from your app you can attach metadata to it, at that point. This metadata is sent, in the background, together with the image to the recipient. When they decide to reply, using your app, you will receive the metadata there.
You can use this, for example, if in your app somebody selected a category to get the image. When you pass in this category in the metadata (which is up to you to format, but JSON is convenient), you get this metadata/JOSN in your app when the recipient replies. You can read the category and load the images on that category already.
The metadata does not set a caption to your image. Actually, there is no integrated way to add a caption to your images.
I would advise to generate the QR-code part of the image and the caption in your app. The image that you post to the Messenger API is thus a combination of the QR-code and a textual caption above or below it. Does that make sense?
ps: about the credible source; I'm a developer support engineer at Facebook :)
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.
I am working on an application which will have an option for users to upload images. Once uploaded, the application will show other images from the web which look exactly similar, whether or not of the same size.
For this, I will create a temporary URL for the image so that I could provide Google custom search API the URL of the image. I would expect in response, URL's of images that are exactly the same or similar to it, perhaps in JSON format.
I did find a similar question posted in January. Till then Google did not support anything like this, apparently:
Google Javascript Custom Search API: Search images by image url
One can also simply do:
http://images.google.com/searchbyimage?site=search&image_url={Image URL}
Since that is not part of an official API, it may not be right to use this method.
Can someone help me?
Well, the answer quite simply is TinEye Commercial API https://api.tineye.com/welcome. I was looking in the wrong place I guess, I did not have any luck with Google Custom Search API.
Would you need a simple result?
If you are, you can use Vision API of Google.
This is very simple.
https://cloud.google.com/vision/
You can try on the top.
First, access the URL.
Second, upload your image file on the "Try API"
Third, click "JSON" tab menu on the result.
You can be seen JSON about similar images.
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¶ms[v]=5.67