WordPress.org

Ready to get started?Download WordPress

Forums

Simple Twitter Connect
Followers not showing up (10 posts)

  1. OC2PS
    Member
    Posted 2 years ago #

    My Twitter followers are now showing up in STC widget. None of them!

    I have about 600+ followers.

    Please help!

    http://wordpress.org/extend/plugins/simple-twitter-connect/

  2. Gardner
    Member
    Posted 2 years ago #

    I have same experience

  3. OC2PS
    Member
    Posted 2 years ago #

    I think the problem is that in line 195, you are using
    $resp = stc_do_request('http://api.twitter.com/1/followers/ids',$args, 'GET');
    but the actual Twitter API URL should be
    http://api.twitter.com/1/statuses/followers/ids.xml?username

  4. OC2PS
    Member
    Posted 2 years ago #

    A bit more digging reveals that the Twitter API has complicated the process of getting a box with follower photos a bit...as opposed to Facebook which essentially creates the box and provides via iframe if you so desire.

    Anyway, it seems to me that 2 critical calls are required:
    https://dev.twitter.com/docs/api/1/get/followers/ids
    and
    https://dev.twitter.com/docs/api/1/get/users/lookup

    Also, would be nice if to avoid hitting rate limits you can cache the calls (if you aren't already doing that.
    https://dev.twitter.com/docs/rate-limiting
    https://dev.twitter.com/docs/api-faq#under_limit

  5. OC2PS
    Member
    Posted 2 years ago #

    Since in my case even total number of followers is not showing up, I'm guessing STC is having trouble getting userids of folloers in the first place

    $args=array();
    
    	$args['acc_token'] = $options['autotweet_token'];
    
    	$args['acc_secret'] = $options['autotweet_secret'];
    
    	$args['screen_name']=$username;
    
    	$args['cursor']=-1;	
    
    	$resp = stc_do_request('http://api.twitter.com/1/followers/ids',$args,'GET');
    
    	if (!$resp) return array();
  6. Arvid
    Member
    Posted 2 years ago #

    +1

  7. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 2 years ago #

    but the actual Twitter API URL should be
    http://api.twitter.com/1/statuses/followers/ids.xml?username

    No, that would be incorrect. The /statuses/ bit isn't part of that API call. See https://dev.twitter.com/docs/api/1/get/followers/ids for more info.

    It also does make the /lookup call to get picture info. This is mitigated by asking for info for 100 users all at once, thus reducing the calls required.

    Also, if you look closely, caching is done by using the Transients API. The cache expiration is set to 24 hours.

    The followers widget is buggy, but in other ways. :)

    I believe that this may be broken if you have twitter set to require HTTPS calls. A future version will fix this, but I need to find time to revamp STC entirely to do it properly.

  8. OC2PS
    Member
    Posted 2 years ago #

    I see.

    Well, since even total number of followers is not showing up, I'm guessing STC is having trouble getting userids of folloers in the first place.

    You have suggested that I might "have twitter set to require HTTPS calls". How do I change that?

  9. OC2PS
    Member
    Posted 2 years ago #

    Sorry, for asking a stupid question. Found and changed the "require https" setting in Twitter settings.

    Unfortunately hasn't had any impact on widget behavior.

  10. OC2PS
    Member
    Posted 2 years ago #

    Hope you find time to revamp STC soon, Otto! :-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic