簡體   English   中英

swift4的facebook ios url方案

[英]facebook ios url scheme for swift4

有誰知道 swift4 的 facebook 計划?
我嘗試了很多方法,還有這些:

fb://profile/\(Username)! ,  
fb://profile?id=[username|user_id] , 

但將我重定向到我的 facebook 頁面的牆上

好的,我使用查找我的 facebook id 解決了這個問題: https ://findmyfbid.com 並將 companyName 替換為 appURL 的 id

讓 appURL = NSURL(string: "fb://profile/1381815961922424")!

首先,您應該在 facebook 開發人員中創建應用程序,然后獲取應用程序 ID 並在 info.plist 中將 YYYYYYYYYYYYYY 替換為您的應用程序 ID

<key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>fbYYYYYYYYYYYYYY</string>

            </array>
        </dict>
    </array>

我只能使用 Facebook 用戶 ID 重定向到用戶個人資料。 所以像http://facebook.com/816657065103305這樣的 URL 轉到用戶個人資料

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM