Php get replies from followers?


#1

Hi All, I’m pretty new on this, and it’s hard to me to find all the info I really need.

I have two twitter users, on of them has an app, user A.

User B is a follower of user A, and what I really need to know, is how to show (by php) the user B replies to A.

I’m trying to using: user_timeline, home_timeline and metion_timeline.

With user_timeline/home_timeline I CAN’T get the Replies of the follower B. Or at list I can’t understand why I can’t get it.

I’m using this code:

<?php
    $statuses = $connection->get('statuses/user_timeline', array('include_entities' => true, 'include_rts' => true , 'screen_name' => $twitterUser , 'exclude_replies' => false, 'count' => $count));
   
 $statuses = $connection->get('statuses/home_timeline', array('screen_name' => $twitterUser));
	
    foreach ($statuses  as $status) 
	{
    ?>
            <div id="update">
                <div id="left"><a href="https://twitter.com/#!/<?=$status->user->screen_name?>" target="_blank"/><img width="48px" height="48px" src="<?=$status->user->profile_image_url?>"/></a></div>
                <div id="right">
					<div class="user"><a href="https://twitter.com/#!/<?=$status->user->screen_name?>" target="_blank"/><?=$status->user->screen_name?></a>&nbsp;<?=$status->user->name?></div>
                    <div class="detail">
						<?php if ($status->in_reply_to_user_id!=NULL)
						{
							echo "RE: " . $status->in_reply_to_screen_name . ">";
						}?>
						<?=$status->text?>
                    </div>
                </div>
            </div>
    <?php
    }
    ?>
</div>

This code works to show the user timeline. But I can’t list the replies of the follower B.

As I mentioned before I’m pretty new, and maybe I’m missing some parameter on the API creation, or the way I create the follower, or in the code…
I’m completely frustated with this. Can you help me?


#2

The user timeline only contains tweets and retweets by the author who owns the timeline – the replies to the tweets aren’t available on the user timeline. You would need to coalesce those replies from another source (like user B’s user timeline) or the Search API.


#3

But, if I can’t see the replies from a follower… How can I know that they exist on the first time?


#4

Indeed, it’s a hard problem which is why you don’t see it solved by too many folks. We have an undocumented method you might be able to suss out that does part of the job of this for you – finding tweets related to a specific tweet – but it’s unsupported and incomplete. If you’re being streamed tweets as they happen instead of excavating them from the past, you can have the replies as they happen and map them that way as an alternative.


#5

Seems like I put mayself into a garden… (spanish expression…).

Then, there is not a simple param that shows you the replies of the followers? Wich is the point of use ‘exclude_replies’ ?

Do I have to make a loop on every single main user tweet, to search for possibles replies?

Many thanks for your replies!


#6