New Landing How can we help? Themeforest Theme Support Supreme YouTube API v2 deprecation breaks get_youtube_subscriber_count

Viewing 6 posts - 1 through 6 (of 6 total)
  • Posted in: Supreme
  • #181911
    BitTyrant
    Member
    Post count: 8

    get_youtube_subscriber_count does a call to the Google API, but version 2 was deprecated as of March 2015
    https://developers.google.com/youtube/2.0/developers_guide_protocol

    I believe this started happening in the last day or so because subscriber count was cached and the cache didn’t clear until recently.

    Anyway a call to Load(“http://gdata.youtube.com/feeds/api/users/$youtubeID”)
    breaks the theme anywhere the Subscriber widget is used.

    The new call requires setting up an authentication token and using
    https://developers.google.com/youtube/v3/docs/channels/list

    and to get a JSON or XML with the subscriber count.

    https://www.googleapis.com/youtube/v3/channels?part=statistics&forUsername=coversdirecttv

    #182003
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    What you meant by it breaks the theme? What errors do you get related to the theme?
    Also what is your site url?

    -Rui

    #182022
    BitTyrant
    Member
    Post count: 8

    The homepage had the “Subscribers” count in a sidebar. The overall page template rendered, but the homepage slider, all the body content, and the sidebars were all empty.

    Errors were like

    [Wed Jun 03 20:26:20 2015] [warn] mod_fcgid: stderr: PHP Warning: DOMDocument::load(http://gdata.youtube.com/feeds/api/users/coversdirecttv)
    : failed to open stream: HTTP request failed! HTTP/1.0 410 Gone
    [Wed Jun 03 20:26:20 2015] [warn] mod_fcgid: stderr: in wp-content/themes/supreme/functions.php on l$
    [Wed Jun 03 20:26:20 2015] [warn] mod_fcgid: stderr: PHP Warning: DOMDocument::load(): I/O warning : failed to load external entity "ht$
    wp-content/themes/supreme/functions.php on line 536
    [Wed Jun 03 20:26:20 2015] [warn] mod_fcgid: stderr: PHP Fatal error: Call to a member function getAttribute() on a non-object
    in wp-content/themes/supreme/functions.php on line 538

    #182153
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Not sure what we can do in this situation.
    Will forward to the development team.

    -Rui

    #184029
    BitTyrant
    Member
    Post count: 8

    How about updating to use the API v3 and if someone hasn’t setup the v3 version then display a dash (-) or some placeholder that doesn’t cause an error?

    #184053
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Sorry, thought I had responded here. Because of the new API needing an API key, we’ve disabled the asset until further notice, while we decide on the changes for it. If it’s a vital feature for you, there are various plugins on CodeCanyon which can provide subscriber counts for almost every social network.

    – Ed

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.