API how to pull player with playlist - does Spotify API support playlists? - api

If you try to embed an individual link, like if you pull an individual link, it pulls the player in our post viewer- however, this is not possible with a playlist. How do I fix this so I am able to play a playlist as if it were an individual link

Yes, you can do it by embedding the Play-list:
<iframe src="https://embed.spotify.com/?uri=spotify:user:ficodelic:playlist:6KEI3T9dx1qgE3xQMSNtZV&view=coverart&" width="252" height="330" frameborder="0" allowtransparency="true" id="SpotifyId"></iframe>
FI

Related

How to get URL preview of link shared in tweet using Twitter API?

I'm using the Tweet Lookup API (part of V2). When a user shares a link in a tweet, a preview of that URL is generated in that tweet. I want to recreate this using API. So how can I get the preview image of the URL and also other details like the domain, etc?
For example, if you look at this tweet: https://twitter.com/elonmusk/status/1429907171639103489
If you see the above tweet, there’s a URL preview card, with image of starlink and a brief description of the link. How to get these details through the Twitter API?
I suppose I am a little late, but..!
Unfortunately, to my knowledge there is no way to get the preview image from the twitter API.
You have to find the link from the tweet, get that site and scrape the image from there. Websites can tell twitter what image they want to use by making a tag that has the property "twitter:image"!
--
What you can do, for example, is get the original URL for the post from entities!
E.g. making the tweet look-up like this:
https://api.twitter.com/2/tweets/1532014165686206466?tweet.fields=entities
From there, get the original url, for example from the "unwound_url" in the JSON response of that look-up example.
You need to make a request to that site and from the html response, look for a tag that has the property set to "twitter:image"
In that tags content you have your image link!
See:
https://developer.twitter.com/en/docs/twitter-api/tweets/lookup/api-reference/get-tweets-id
https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/tweet
I hope my rambling made sense and good luck!
Unfortunately, this is impossible because Twitter requires URLs with Twitter meta tags in order to show these Links as cards with images. So the only way to do that is to add these meta Tags in the head of your website :
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="LINK TITLE HERE">
<meta name="twitter:description" content="LINK DESCRIPTION HERE">
<meta name="twitter:image" content="PREVIEW IMAGE HERE">
This is how I made it on my own website. I hope that will help you.

generating streaming link api

i want to know how to use google api, can anyone give some example using php.
eg. use api to get picasa album rss.
Any help is appreciated!
For that you have to embed the video in your html with an iframe and a url like this:
<iframe src="https://drive.google.com/file/d/{videoID}/preview" width="640" height="480"></iframe>
Just change the {videoID} for the id of you video.
To get that code from Google, you should follow the next steps:
Open the video in your Drive.
In the top right of the view, you will see an icon that says "Pop-out", Click on it.
It will open the video in a new tab.
In the new tab click on the icon of the three dots that says "More actions" (in the top-center).
Select the option that says "Embed item...". You will see a popup with html code.
In general, there is no way to "predict" or "construct" a direct link to your Drive file. The supported method of getting the link is to use the Drive API. If you make an HTTP request to the file metadata endpoint https://www.googleapis.com/drive/v2/files/{fileId} with a valid API key, the webContentLink value should be the googleusercontent.com URL for your file.
You can try this out on the Google API Explorer - drive.files.get to see all of the information which is available through the Drive API.

Using youtube API in asp.net mvc

I've a website built on asp.net mvc.I would like to include the videos from my youtube channels using youtube API.What's the best way to embed videos in a website from YOUTUBE using YOUTUBE API?
Since January 2015 Youtube recommends to embed the videos using an iframe: see doc here.
Once you get the api video list from https://www.googleapis.com/youtube/v3/videos, all the video ids are placed within the items object response.
From there you would do something as follows:
<iframe width="420" height="315"
src="http://www.youtube.com/embed/{{YOUR_VIDEO_ID_HERE}}?autoplay=1">
</iframe>

iFrame Facebook app to show it on Website

There is an app on Facebook which I want to show onto my Website. Is there a way which allow me to do that?
Here is a link to the Facebook app which I want embed onto my website
https://apps.facebook.com/quranic_verses/?fb_source=timeline
I have tried to iFrame the app but it is not working for me,
<iframe
src="https://apps.facebook.com/quranic_verses/"
width="100%"
height="310"
scrolling="no"
frameborder="0" align="center">
</iframe>
Thanks, appreciated!
Facebook doesn’t allow their pages to be displayed inside foreign frames.
You could of course embed the app’s URL, that gets displayed inside the canvas iframe on Facebook, directly (https://quran.io/facebook/tab/, or https://quran.io/ for a larger version).
But before you do so, you should check with the owner if they want you to do so or not.

Attempting to use <iframe> tag to embed YouTube videos

I am using the following line of code to embed a YouTube player onto a new webpage. I've got over 200 videos online from 50 or so different performers. I'd like to create a page with all of the performers listed and then when you click on that performer's name their playlist will pop into a solo YouTube player. I can't seem to find a way to exchange the list=PLplaylist_ID to a variable that can be passed when the viewer clicks on a particular name. I need to use the tag due to the flash-not-playing-on-iPad-issue :)
iframe id="ytplayer" type="text/html" width="853" height="480"
src="http://www.youtube.com/embed/?listType=playlist&list=PLplaylist_ID&modestbranding=1&rel=0&autohide=1"
frameborder="0" />
Any help would be appreciated!
Ron
iframe never will play video for you.
It is just HTML container. What u need is launch html page inside iframe with YouTube player code inside.
For that You can try native Video TAG with fallback to flash (long way, reinvent bicycle ) or you can try to load in iframe : http://flowplayer.org. or http://videojs.com/