window.Twitch.ext.viewer.isLinked is the most effective see also Reference | Twitch Developers
window.Twitch.ext.actions.requestIdShare(); will not work in the rig as it doesn’t have a “Twitch Session” to use to pop the popup.
The rig will populate parameters as defined by the settings of the view. And a view cannot change “state”
State changes such as changing from not isLinked to isLinked is best tested on the Twitch Website itself