New Landing How can we help? Themeforest Theme Support Dante Twitter Widget Problem

Viewing 9 posts - 1 through 9 (of 9 total)
  • Posted in: Dante
  • #37032
    ielbury
    Member
    Post count: 51

    The Twitter Widget has a problem where the $tweets and $username arguments are incorrectly passed to the sf_get_tweets function.

    sf_get_tweets is expecting:

    function sf_get_tweets($twitterID, $count)

    But is being called with the following args:

    $result .= sf_latest_tweet($tweets, $username);

    Maybe this could be fixed on the next version so I don’t have to change code when I upgrade.

    Thanks,

    Ian

    #37044
    wccberg
    Member
    Post count: 12

    Also have this problem which displays the following on my website

    Fatal error: Cannot use string offset as an array in /home/content/13/12173613/html/wp-content/themes/dante/swift-framework/sf-functions.php on line 215

    Thanks

    #37100
    ielbury
    Member
    Post count: 51

    @cvac01, I am not sure if this is your problem, but the Twitter oAuth plugin requires the PHP cURL module installed and activated.

    It looks like you are on a Linux box, for Ubuntu:

    sudo apt-get install php5-curl
    sudo service apache2 restart
    

    Ed, I know that it was in the docs by way of a referenced article. It might make things easier for newbies like me If this requirement was highlighted as a point.

    Cheers,
    Ian

    #37140
    wccberg
    Member
    Post count: 12

    It worked before the latest update to WordPress 3.8? I did however recently move hosting accounts with the same host, just off of another shared hosting I had. Perhaps this has something to do with it?

    #37497
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi Ian,

    That function is different to the one that lists tweets, and is working fine here.

    Are you still having the issue?

    – Ed

    #37504
    ielbury
    Member
    Post count: 51

    I changed the code in widget-twitter.php by reversing the arguments to make it work.

    With your standard code, if I enter a count of 5, I get the tweets for @5.

    I know that someone else in this forum has this same issue and it was related to a lower level api function signature change. When they changed the signature, they made it backwards compatible by checking for an int or string for the count. In this case, the check is broken when the count is passed in 1 versus ‘1’.

    I suspect that depending on where the count comes from and if it’s converted to a proper int, it’s broken but in other places it’s not. Gotta love dynamic languages ๐Ÿ™‚

    #37506
    ielbury
    Member
    Post count: 51

    I just looked at the original post and noticed the I wrote the wrong function and it should be sf_latest_tweet and not sf_get_tweets. My bad!

    I still stand by my hypothesis that the arguments are backwards.

    #37876
    ielbury
    Member
    Post count: 51

    Problem solved in 1.2. No code changes required.

    Thanks for the support.

    #38130
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Yes, the twitter oAuth plugin changed their function and we updated that in v1.2 ๐Ÿ™‚

    – Ed

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

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register