Philip7899
Philip7899

Reputation: 4677

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

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?

Upvotes: 1

Views: 619

Answers (1)

Victor Horton
Victor Horton

Reputation: 23

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

fb://profile/userid

Upvotes: 0

Related Questions