---
schema_version: "1"
id: e785acda662ed0845dcc1cebbfc699bfe981923b9956481be5e9d9f82f1c3169
title: Get Feed Elements From a Feed
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexcode/connectapi_examples_get_feed_elements.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/connectapi_examples_get_feed_elements.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8dd1512f59e8809a9fcdaa4ea0e1fcaf8f19e2012e7ea25deb53248da948dd9a
description: Call a method to get feed elements from a feed.
---
# Get Feed Elements From a Feed

Call a method to get feed elements from a feed.

Call [getFeedElementsFromFeed(communityId, feedType, subjectId)](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexref.meta/apexref/apex_ConnectAPI_ChatterFeeds_static_methods.htm#apex_ConnectAPI_ChatterFeeds_getFeedElementsFromFeed_2) to get the first page of feed elements from the context user’s news feed.

ConnectApi.FeedElementPage fep = ConnectApi.ChatterFeeds.getFeedElementsFromFeed(Network.getNetworkId(), ConnectApi.FeedType.News, 'me');

The getFeedElementsFromFeed method is overloaded, which means that the method name has many different signatures. A signature is the name of the method and its parameters in order.

Each signature lets you send different inputs. For example, one signature may specify the feed type and the subject ID. Another signature could have those parameters and an additional parameter to specify the maximum number of comments to return for each feed element.

![Tip](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/images/icon_note_tip.png)

#### Tip

Each signature operates on certain feed types. Use the signatures that operate on the ConnectApi.FeedType.Record to get group feeds, since a group is a record type.

#### See Also

- [_Apex Reference Guide_: ChatterFeeds Class](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexref.meta/apexref/apex_ConnectAPI_ChatterFeeds_static_methods.htm "Apex Reference Guide: ChatterFeeds Class - HTML (New Window)")