菜鸟教程小白 发表于 2022-12-11 19:43:28

ios - Ionic 无法从应用程序打开 facebook 个人资料页面


                                            <p><p>我想在 <code>ionic</code> 应用程序中打开与用户对应的 Facebook 个人资料页面。我使用 <code>cordovaInAppBrowser</code> 插件。</p>

<pre><code>url = &#39;fb://profile/vahid.vdn&#39;;
var options = {
    location: &#39;yes&#39;,
    clearcache: &#39;yes&#39;,
    toolbar: &#39;yes&#39;
};
$cordovaInAppBrowser.open( url, &#39;_system&#39;, options ).then(function(event) {
    // facebook app is already installed and opened successfully
})
.catch(function(event) {
    // facebook app isn&#39;t installed in this device
    url = &#39;https://facebook.com/vahid.vdn&#39;
    $cordovaInAppBrowser.open( url, &#39;_system&#39;, options );
}
</code></pre>

<p>这只是在 Facebook 应用程序中打开 Facebook 的主页。 (平台:<strong>iOS</strong>)</p>

<p>有什么想法吗?</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>在 Facebook 上试试这个,</p>

<pre><code>url = &#39;fb://profile?id=vahid.vdn&#39;;
</code></pre></p>
                                   
                                                <p style="font-size: 20px;">关于ios - Ionic 无法从应用程序打开 facebook 个人资料页面,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/44139929/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/44139929/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - Ionic 无法从应用程序打开 facebook 个人资料页面