问题描述
我尝试在 react native 中使用 webview 实现 disqus ...... 代码:
<AutoHeightWebView
ref={webview}
source={{
uri: `https://isrmicha2.github.io/react-native-disqus-static/?shortname=${shortname}&url=${url}&title=${id}`,}}
javaScriptEnabled={true}
domStorageEnabled={true}
startInLoadingState={true}
originWhitelist={['*']}
style={{
width: Dimensions.get('window').width - 15,marginTop: 35,alignSelf: 'center',height: Dimensions.get('window').height,backgroundColor: 'white',}}
zoomable={false}
thirdPartyCookiesEnabled={true}
/>
上面的代码打开一个 react native webview,然后在 app 中渲染 disqus.. 源代码包含由 disqus 提供的通用代码。 但是它不允许用户登录......尝试登录时,它会打开一个默认浏览器并且不会重定向回应用程序.. 非常感谢这方面的任何帮助。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)