Adding multiple youtube playlists to site just like youtube has em - youtube

this is desired output for site
this is how youtube displays multiple playlist...how can I add this just like they have it to my site AND to linkedin profile?
embedding the share html link just brings in playlist but it does not display properly....I need it to appear exactly like it does in attached pic???

Linking to your LinkedIn profile, I have not tried. So perhaps someone else can tell you.
As to having a section like the one you showed to be on your own site is doable.
Firstly you will need to collect the playlist ID's that you are going to use.
Then you will need to get the video ID's from the video's in each Playlist.
This can be done with the API.
As to the displaying it like on youtube, you will need to do that yourself with one or more combination of table's, div's and CSS. Then With the information you grabbed in the APi, populate it.
Best to do it in a loop so as to be done all at the same time. Then put it to the page where you require it to be.

Related

YouTube API Search by Tags

I'm trying to add videos to an existing ASP.NET MVC site, and I'd like to show videos from our YouTube channel.
I have added a tag to each video to indicate what page it should appear on. I had thought that I could search our channel by tag on each page to render the relevant video on that page.
I'm trying to exclusively use the API v3, but it seems I can't do this.
I can't use developer tags, because videos are uploaded by multiple users using the standard YouTube front end. This seems like basic functionality, so I'm assuming it's my inexperience with this API.
As an example, our YouTube channel is ChillinWithCharlie. During development, one video is tagged 20141213Cheneys.
I can get all videos in our channel, but is there a way to query the v3 API to retrieve just this video?
I've seen one suggestion here that I retrieve all videos, and filter in code. This feels inefficient, so I'd rather not do this, but I can't even see where the tag is returned with all channel videos, that I could interrogate in code.
It's not just you. There seems to be no specific query parameter to search by tag with API v3.
I would recommend doing a search with your tag in the 'q' (search) parameter, then checking the results to see if the tag exists in the returned snippet->tags property to verify the exact video.
Note YouTube tags are only visible to the video's uploader.
https://developers.google.com/youtube/v3/docs/videos#snippet.tags[]

How to allow users to embed YouTube & Vimeo videos?

How can I go about allowing users to embed YouTube and Vimeo videos in my Rails app?
I'd provide a text field or text area where users can add the link of the video they wish to embed.
Click add and have my app show a spinner while the details are being gathered.
When the details are found, I'd want them displayed on the page before user can finally submit the post.
I'm guessing the HTML, link details will need to be stored in the database so the video can automatically be displayed every time the page is visited.
HTML5 has a file API that gives me the ability to display users local file data on the fly. Wondering if there is something similar for display remote data or would normal ajax be used?
Is there a standard way of doing this? Also are there any tutorials out there on how to do this in rails? Would like to go about doing this in the most safest and securest way.
I love tutorials and screencasts so I'd really be thankful for info on where I can find one to achieve what I'm trying to achieve.
Try to use open graph protocol to fetch site information before user sending the form.
I suggest the following gem:
https://github.com/intridea/opengraph
Open graph protocol:
http://ogp.me/
And I guess you should store all the fetched information in database.
The Video Thumb gem is probably what you are looking for.
It handles vimeo, youtube and potentially others.
Then you just do:
<%= VideoPlayer::player(library_item.url, 700, 420).html_safe %>
In your view to display an automatically generated embed code.

search for and embed youtube videos in ruby on rails application

I have a website where I want to basically allow people to display several youtube videos onto the same page.
For example, I have a friend who has 3 different videos. Instead of sending a link to the three videos individually, they would go to my site see the 3 search boxes, search for the videos individually (the search is done on youtube), then they can pick the videos and click "done", at which point, the 3 videos would be embedded on their page.
I'm trying to figure out how to approach this in ruby on rails, but I'm not finding much information on how.
Here's a link from 2009 of a guy who's saying that he can actually do the search and retrieve from youtube: http://railsforum.com/viewtopic.php?id=30443
But I don't know how to do the search & retrieve, and I don't know how to do the embed. I think I can figure out the embed, but what's the best way to do the search/display results?
Thanks a lot for your help stackoverflow, you're my only hope (besides google, but google failed me today).
all you need to know about the search feature is described in YouTube Data Api. You will need your app to communicate with this API. The best thing to do may be to look after a gem specialized in this ; there is a list available in another StackOverflow question.

How to add Twitter Expanded Tweets? (was: twitter media preview card for my site?)

I googled a lot about how to make twitter media preview for my website entities if they are linked in a tweet like images below:
Any idea where can I find some documentation about it? Or a tutorial? Is this possible or these media/site previews are hardcoded in twitter?
EDIT:
so, what I need:
If someone links my site on twitter, my widget appear under the tweet, like below:
UPDATE 2012-06-13
It appears this is an Expanded Tweet - -what the requirements are to integrate these expansions into Twitter are do not appear to be displayed - but this sure is interesting.
Nope your in luck. They're not hardcoded into Twitter, they're available in the JSON response. You actually have in your post the word you need to google for entities.
You can add include_entities=1 to the end of most REST api calls and it will give you expanded information about the URL's contained within the JSON. It will split out all the URL's where you can parse out the Youtube links for example. The JSON also includes a special media_url entity but it only works for pictures. In any case, you can still parse out the media easily like youtube with a regex match because you get the URL's split out nicely with this include_entities=1 parameter.
example call :
http://api.twitter.com/1/statuses/user_timeline.json?screen_name=twitterapi&include_entities=1
more documentation : https://dev.twitter.com/docs/tweet-entities
answer edited below based on clarification:
Editing Twitter itself with previews is impossible and it's also ineffective. 75% of traffic to Twitter happens outside of Twitter.com. However the most probable solution to achieving this request would be to download a browser extension.
This extension for example enbales previews of webpages directly in the users stream content preview pane on Twitter.com
https://chrome.google.com/webstore/detail/oijgblonhcagdhfbgjilnpjipmijimmn

Youtube player for multiple videos from various accounts

I have a page that has many videos on it and the page has become so slow it is unusable. These are all Youtube videos and I changed to the new iFrame tags hoping that would help the loading. I need a solution to make this page more useable.
I would be happy if I could just pull a frame from the video and display that, when clicked it would load the video. Or I would be happy with a multi-video player. The custom play from Youtube will not work because the videos I am serving are not all from my account and as I understand the custom player you reference a group from your account. I have also considered using AJAX to load the iframe, which would be okay too if I could figure out how to get a thumbnail of the video to show as a link.
Ideas and suggestions are welcome. Thanks in advance for any ideas.
YouTube API is made up of 2 different sets - one for the player and one for the data.
You can start here ...
http://code.google.com/apis/youtube/overview.html
... then click on "Data API" link and after looking over that page, click on the "Reference Guide" link.
In essence, the gData API will allow you to get videos in numerous ways (feeds, channels, tops, etc) in chunks of up to 100 videos at a time, using a startIndex (or whatever it may be called) option for paging. What you get is an XML document with parts or everything that YT has about a video, including not one but several different thumbnail images.
HTH helps you and/or another Web 0.2 Fellow (like me)

Resources