Reputation: 39
Does anyone know the scheme of facebook for swift4?
I have tried many ways and also these:
fb://profile/\(Username)! ,
fb://profile?id=[username|user_id] ,
but redirects me to the wall of my facebook page
Upvotes: 1
Views: 3363
Reputation: 39
Ok guys i solved it using find my facebook id:https://findmyfbid.com and replace the companyName with id for the appURL
let appURL = NSURL(string: "fb://profile/1381815961922424")!
Upvotes: 2
Reputation: 4817
I could only redirect to user profile using facebook user id. So the URL like http://facebook.com/816657065103305 goes to user profile
Upvotes: 0
Reputation: 100549
First you should create app in facebook developers then get the app id and in info.plist replace YYYYYYYYYYYYYY with id of your app
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fbYYYYYYYYYYYYYY</string>
</array>
</dict>
</array>
Upvotes: 1