React Native Linking to facebook profile only opens current user's profile instead of given URL

607 Views Asked by At

I have the following code:

Linking.openURL(`fb://profile/?app_scoped_user_id=${user}`)

user is taken from the url of the person's profile, so in the url https://facebook.com/ian, user would be ian.

No matter who the user is, the facebook app always opens to the profile page of whoever is logged into facebook, not the user as listed in the url.

How do I link to a user's facebook profile in the facebook app from a React Native app?

1

There are 1 best solutions below

0
On

You must pass in the userId not the user name to link to the users profile

fb://profile/userid