jacquagnui / php-twitter

Automatically exported from code.google.com/p/php-twitter
0 stars 0 forks source link

friendsTimeline displays userTimeline #49

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. get $twitter->friends_timeline
2. display results
3.

What is the expected output? What do you see instead?
Expect to see...Returns the 20 most recent statuses posted by the
authenticating user and that user's friends. This is the equivalent of
/timeline/home on the Web.
http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses-friends_timeline
Instead I sese the userTimeline. The code makes the mistake of thinking
user timeline is the same as friends timeline.

What version of the product are you using? On what operating system?
1.1... hmmm linux flavor.

Please provide any additional information below.

Original issue reported on code.google.com by john...@gmail.com on 28 Aug 2009 at 4:11

GoogleCodeExporter commented 8 years ago
*also the order of the parameters should follow the same order as userTimeline 
- if
for no other reason then consistency.   The below code retrieves the correct 
data.

function friendsTimeline( $id = false, $count = 20, $since = false, $since_id =
false, $page = false )
    {
        if( !in_array( $this->type, array( 'xml','json','rss','atom' ) ) )
            return false;

        $args = array();
        if( $id )
            $args['id'] = $id;
        if( $count )
            $args['count'] = (int) $count;
        if( $since )
            $args['since'] = (string) $since;
        if( $since_id )
            $args['since_id'] = (int) $since_id;
        if( $page )
            $args['page'] = (int) $page;

        $qs = '';
        if( !empty( $args ) )
            $qs = $this->_glue( $args );

        if( $id === false )
            $request = 'http://twitter.com/statuses/friends_timeline.' . $this->type
. $qs;
        else
            $request = 'http://twitter.com/statuses/friends_timeline/' .
rawurlencode($id) . '.' . $this->type . $qs;

        return $this->objectify( $this->process($request) );
    }

Original comment by john...@gmail.com on 28 Aug 2009 at 4:16

GoogleCodeExporter commented 8 years ago
I tried this new method friendsTimeline and works really fine. You should 
update the
library version.

Original comment by marconip...@gmail.com on 30 Sep 2009 at 3:52

GoogleCodeExporter commented 8 years ago
Agreed - I just did the same thing myself, then came here to file a report and 
found
exactly the same fixed suggested 5 weeks ago.

Original comment by wabznas...@gmail.com on 10 Oct 2009 at 3:49