# Global Feed

![](https://2352509137-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MX0mOAVWkotGme0iRzu%2F-MX6x9UIJ4aWZh5yRDdN%2F-MX6y6iCw6WJrdpAP5gP%2Fimage%20\(6\)%20\(2\).png?alt=media\&token=88c37146-a97f-408b-ab07-be0ed4447492)

### Features

| Feature     | Description                                                   |
| ----------- | ------------------------------------------------------------- |
| Global feed | Scroll vertically to see a list of posts from the global feed |

### Usage

**Create a Fragment**

You can use either of these two methods:&#x20;

1. `build` - the posts will be ranked in chronological order. \
   \
   Below is the sample code.

   ```swift
   AmityGlobalFeedFragment.newInstance().build()
   ```

2. `<newCustomPostRankingmethod>` - the posts will be ranked according to a score-sorting mechanism. Refer to [Custom Post Ranking](https://docs.social.plus/~/changes/5GVz91dkzloMulIORPZq/amity-uikit/android/community/using-only-some-components/community-home-page/newsfeed/broken-reference) for more information about this feature.\
   \
   You can retrieve your global feed sorted by ranking score with this code.

   ```swift
   let viewController = AmityGlobalFeedViewController.makeCustomPostRanking()
   ```
