0

How to get the list of feeds/activities for users whom we are following.

I tried $user_feed_1->following(10, 20); but not getting feed data like we get in $user_feed_1->getActivities(5, 10);

I am using Laravel framework. I am not getting any error but getting output array(size=4) 'created_at' =>string'2016-04-29T04:14:49.416Z'(length=24) 'feed_id' =>string'flat:1986'(length=9) 'target_id' =>string'user:6028'(length=9) 'updated_at' =>string'2016-04-29T04:14:49.416Z'(length=24)

Not the output as for feed

Tommaso Barbugli
  • 11,781
  • 2
  • 42
  • 41
Ankesh Kumar
  • 515
  • 2
  • 17

1 Answers1

0

If you want to retrieve the list of users, and not the follow connections created for their feeds, you should store the follow connections in your database as well.

The official laravel example apps does exactly this, it stores follow connections between users and sends API calls whenever those connections are created or destroyed. You can see how that's done by looking at the Follow model in the code of the example.

Tommaso Barbugli
  • 11,781
  • 2
  • 42
  • 41
  • I wants all feeds for all users whom we are following. – Ankesh Kumar May 02 '16 at 03:41
  • I used following code to follow user :$followFlatFeed = \FeedManager::getClient()->feed('flat', $follow->target_id); //$followFlatFeed = \FeedManager::feed('flat', $follow->target_id); $followFlatFeed->followFeed('user', $follow->user_id); For reterving I used following $feed = \FeedManager::getNewsFeeds($user_id)['flat']; $activities = $feed->getActivities(0, 100); But I am not getting feeds of user whom I am following – Ankesh Kumar May 02 '16 at 06:18
  • i am not geting following useres feeds using above . – Ankesh Kumar May 02 '16 at 16:31