Is adding a Download Limit to the Soundcloud Widget possible? - soundcloud

Hi Soundcloud developers,
is there any way for you to add a download limit to the standard soundcloud widget?
<iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F110900242%3Fsecret_token%3Ds-G1Cy7&color=00adef&auto_play=false&show_artwork=true"></iframe>
I imagine adding download_limit=100 to the widget code or something like that... Would be very helpful!

if you have some experience with javascript, you can check for download_count of the track with soundcloud api before you show the widget.
if download_count <= 100 simple put &download=true else &download=false

Related

Can you embed a spotify song to a github README file?

I know this isn't really that important but I thought it would be fun if you could embed a spotify to your markdown.
I tried pasting this into the README.md-file but it didn't transform into a widget:
<iframe src="https://open.spotify.com/embed/track/1UgMLFmeVyphjePcN1TNpq" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>
Can somebody tell me if it's possible to embed this using markdown?
It's currently not possible to use iframes inside of your README on GitHub. This question has to do with the same underlying issue you're having. In short, iframes are not on the list of allowed HTML tags. You can see which tags are allowed here: https://github.com/github/markup/issues/245#issuecomment-357613929
You can just put this line of code in your README file:
[![Spotify](https://spotify-github-readme.vercel.app/api/spotify)](https://open.spotify.com/collection/tracks)
And it will display the Spotify songs in your README file

Google+ share counts are not showing

I am using Google+ JavaScript API and currently my Google+ share counts are not showing on the website.
Note: I am using Google+ JavaScript API
This is the code I tried
<!-- Place this tag in your head or just before your close body tag. -->
<script src="apis.google.com/js/platform.js" ; async defer></script>
<!-- Place this tag where you want the share button to render. -->
<div class="g-plus" data-action="share" data-annotation="vertical-bubble" data-height="60">
</div>
They have been retired now so the share counts are no longer available.
Google may have done this to speed up the load time of the Google Plus buttons.
https://plus.google.com/110610523830483756510/posts/Z1FfzduveUo

Dynamically embedding soundcloud clips

If you want to embed youtube dynamically then it is totally easy. You just replace the video id in the embed code.
<iframe width="420" height="315" src="http://www.youtube.com/embed/<?=$youtubeid;?>" frameborder="0" allowfullscreen></iframe>
I'm struggling to do the same thing with soundcloud. Is it possible? - the embed code is as follows:
<iframe src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F57162664&show_artwork=true"></iframe>
It seems to me like you'd need to know this api code to embed the track, and so you'd have to look this up each time.
The 'api code' is just tracks/ followed by the track id (or groups/ with a group id, etc), not too different from YouTube, it's just not as easily accessible as YouTube's, since the id isn't in the URL. You can get the id from looking at the share code on a track, but even easier is to use the oembed service to get the full embedding HTML needed (it also calculates the proper height of the iframe to include), and it only requires the 'permalink' url which you see on a track page.
An updated version of the widget coming in the next few weeks should also support the permalink urls out-of-the-box.
Looks like you have to use the API to dynamically get the embed code:
Here's the documentation:
http://developers.soundcloud.com/docs#playing

Add Like Button to website

I am trying to install the like button on my website but cannot get it to appear on the website.I have tried everything but no joy. I have pasted the codes etc. etc but nothing. I use Serif Webplus X2 for web design.
I added the code to a html text box and after uploading to the web only the code print appears on the website but no button. However if I use the Facebook Platform code it works??
I had the same problem, i found interesting information on this website
http://www.webmonkey.com/2010/04/adding-facebook-like-buttons-to-your-site-is-damn-easy/
More easy, Facebook generate the code for the button "I like" for any website.
http://developers.facebook.com/docs/reference/plugins/like/
Add the below HTML code on any page:
<iframe
src="https://www.facebook.com/plugins/like.php?href=http://www.facebook.com/NiraTechTraining?ref=ts&fref=ts"
scrolling="no" frameborder="0"
style="border:none; width:450px; height:80px">
</iframe>
Get Your Code Here: http://developers.facebook.com/docs/reference/plugins/like/
The easiest way is to use a "iframe".
Make a HTML block and paste it into the body (Click the 'Paste to Body' Button on top right)
If it doesn't work in your preview, you have to Host it.
If you are willing to upgrade, Serif WebPlus X6 and later versions include support for Facebook Like buttons. In X6, go to Insert->Social Media->Facebook Widget and select 'Like Button' from the drop-down.

Facebook "like" button on comments

Is it possible to implement the Facebook like and share functionality for "liking" the comments of other users on a website? Does every comment has to have a permalink?
I have asked the question on Facebook developers forum, and they have come back to me with this response. Basically, the functionality that is required is not available.
http://forum.developers.facebook.net/viewtopic.php?pid=316205#p316205
Intro:
You will need individual like buttons for every comment, and as #Fnatte says you can then reference them to the comment by giving it an ID like #com1,#com2etc...
The best way to achieve this is through a for loop (I imagine you are pulling from a DB) that will iterate through and add the relevant code for the like button and implement the URL based on the comment it is pulling,
The Code:
You have 2 options, <iframe>:
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fexample.com%2Fpage%2Fto%2Flike&layout=button_count&show_faces=false&width=90&action=like&font=segoe+ui&colorscheme=dark&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe>
This is VERY slow, especially if you have a lot of comments loading at the same time, it does mean you don't need to import their JS library though,
Then there is the FB JS SDK:
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://example.com" layout="button_count" show_faces="false" width="90" font="segoe ui" colorscheme="dark"></fb:like>
This I would argue is a more eficcient way of doing things, but it does require a bit more time and effort - but will be well worth it.
The script of course can be imported only once in the head and then used multiple times throughout the page (perfect for what you need).
The URL to like is based on both the URL in the address bar and the ID that you have assigned to the code (e.g. #comment1) so the URL you are liking looks like this: http://mypage.com/page#comment1
Further Reading:
http://developers.facebook.com/docs/reference/plugins/like/
http://developers.facebook.com/docs/reference/javascript/
http://developers.facebook.com/docs/plugins/
Good luck and I hope this helps!
DEMO & SOURCE http://so.devilmaycode.it/facebook-like-button-on-comments/
updated, hope this help
I have never done it myself but you should probably check out http://developers.facebook.com/docs/guides/web#plugins.
It looks like you would need a unique link for each comment.
You could try including a fragment identifier in every URL like:
http://domain.com/article1#comment1
http://domain.com/article1#comment2
Facebook has rolled out a new version of the comments plugin which supports advanced functionality such as "liking" and replying to other comments. In addition, replies to a comment made on Facebook.com are now pushed back to the comments plugin (hosted on another site.)
How to enable:
Add the migrated attribute:
<fb:comments xid="YOUR_XID" migrated="1"></fb:comments>
OR use the href attribute instead of xid for future comments boxes
<fb:comments href="YOUR_CANONICAL_URL"></fb:comments>
References:
New <fb:comments>
Legacy <fb:comments>