【问题标题】:How to have a SoundCloud Follow button on my website?如何在我的网站上设置 SoundCloud 关注按钮?
【发布时间】:2014-09-29 01:18:27
【问题描述】:

有没有办法在我的网站上嵌入 SoundCloud 关注按钮,以便用户可以从自己的网站关注页面/频道?

是否也可以与 Vimeo 有类似的东西?

【问题讨论】:

标签: soundcloud vimeo vimeo-api


【解决方案1】:

看起来 SoundCloud 通过他们的API 为“关注”打开了功能

不幸的是,他们暂时关闭了来自 registering 的新应用程序及其 API...不确定何时/是否会重新开放。

【讨论】:

    【解决方案2】:

    感谢@davidpm4 - 让它与更新后的API here一起工作

    这里是授权。弹窗代码:

    <script src="https://connect.soundcloud.com/sdk/sdk-3.3.0.js"></script>
    <script>
    SC.initialize({
      client_id: 'YOUR_CLIENT_ID',
      redirect_uri: 'http://example.com/callback'
    });
    
    // initiate auth popup
    SC.connect().then(function() {
      return SC.get('/me');
    }).then(function(me) {
      alert('Hello, ' + me.username);
    });
    </script>
    

    这是用于回调的:

    <script src="https://connect.soundcloud.com/sdk/sdk-3.3.0.js"></script>
    <script>
    SC.initialize({
      client_id: 'YOUR_CLIENT_ID',
      redirect_uri: 'http://example.com/callback'
    });
    
    SC.connect().then(function() {
      // Follow user with ID 3207
      SC.put('/me/followings/3207').then(function(){
        // Unfollow the same user
        SC.delete('/me/followings/3207');
      });
    });
    </script>
    

    【讨论】:

      【解决方案3】:

      对于 SoundCloud,您可以在此处自定义图标 - https://soundcloud.com/pages/embed

      【讨论】:

      • 嗨,这只是将用户重定向到我的 SoundCloud 页面,对吗?我想要的是一种让用户自己从我的网站“关注”我的 SoundCloud 页面的方法。
      • 很遗憾,我们目前不提供类似的服务。
      • @gryzzly - 请提供。
      • 根据 OP 的评论,这个答案是多余且不精确的。我投了反对票。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-07
      • 2020-07-03
      • 2016-02-14
      • 1970-01-01
      • 1970-01-01
      • 2015-12-23
      相关资源
      最近更新 更多