Here's the answer for Drupal 8/9
This is how I accomplished this task. I'm making the assumption the flag has already been created and that it has "Display link as field" checked in it's configuration. Also this howto is tailored to nodes, but it can be used on any other entity type as well with a few adjustments to urls and pathways to where the display modes are edited:
- To make the Title field configurable on nodes, in a custom module add the following hook as defined over at https://drupal.stackexchange.com/a/178476/5638. This only applies if the content you are working on are nodes. Custom entities can usually skip this step.
function mymodule_entity_base_field_info_alter(&$fields, $entity_type) {
if ($entity_type->id() == 'node') {
if (isset($fields['title'])) {
$fields['title']->setDisplayConfigurable('view', TRUE);
}
}
}
- Navigate to Structure -> Display Modes (/admin/structure/display-modes)
- Click on "View Modes" (/admin/structure/display-modes/view)
- Scroll down and click on Add new Content view mode (/admin/structure/display-modes/view/add/node)
- Type in the name "Favorite Field" and click Save
- Navigate back to Structure -> Content Types (/admin/structure/types)
- Click Manage display next to a content type you want to show the favorite field for in your view.
- Click on Custom Display Settings to expand it
- Select "Favorite Field"
- Click Save
- Select the "Favorite Field" tab from the top
- Remove all fields except your favorite field
- click Save.
- Repeat steps 6-13 for each content type you wish to display in your search API View.
- Navigate to Structure -> Views
- Click Edit next to your view
- In the fields section of your view click "Add"
- Make sure to Check the "For" drop down incase you want it only for this display
- In the search, type "rendered"
- Choose "Rendered Item"
- Click Apply
- Choose your options as you wish to format this field
- Make sure you choose "Favorite Flag" from Display Mode.
- Click Apply
At this point, if your content is indexed, you should see in the preview, the "I Like" link show up and should be have as configured. Here is a quick screenshot of a test view I did

And another instance in the wild with a custom entity using the OpenKJ module and the table display plugin instead of unformatted list. Flag's Javascript links work and everything.
