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

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?

You must pass in the userId not the user name to link to the users profile
fb://profile/userid

Related

How can I get the user's Facebook profile link with verification?

In my app, user can add their Facebook profile link. But I don't want to add the user's Facebook profile link without verifying it.
I can get the user's verified Facebook profile link from LoginManager.logInWithPermissions(["user_link"] using react-native-fbsdk-next package. But I don't want to log in using Facebook since the user already signed in using google or any other way in my app.

How can I launch facebook messenger with to enable user to user chat

Users log into my app through the facebook sdk. If one user clicks on another user I'd like to enable them to chat via facebook messenger. I can launch messenger from my app, but is there a way to launch into the chat screen with a specific user.
You can open a conversation in Messenger with deep links:
http://m.me/{user_name} <- this is official link for Messenger. You'll need to ask user for his Messenger's username.
fb-messenger://user/{user_id} <- this link is not documented, so it can break any time (Deep linking). user_id probably is the Facebook User Id, so it will be easier to obtain, however you'll need to ask for user_profile permission to get user id (Messenger Permissions)

How can we login multiple account on same browser

I am creating an app with Node.js express to display social media feeds using their API. I am using FACEBOOK, TWITTER, INSTAGRAM. When I click on any social media icon, a popup window is appearing to login. After logging in all of them. I clicked a button to display feeds. This is working good for single account. Now I want to login multiple account for every social media. But whenever I clicked another social media icon to login .I saw there is already logged in.
For example I click Facebook icon to login . After appearing model window I fill up my username(jrajput315) and password. After logging in this account, I want to login some other Facebook account. And I click Facebook icon to login again. But I see (jrajput315) is already logged in there.
Since you are already logged in to Facebook from one account, Facebook uses a sign-in cookie to keep you logged in. Until this cookie is flushed out, you cannot login through another facebook account on the same browser in the same session.
I guess similar practice happens with few other web-apps, if I am not mistaken.

Facebook Login Using UIWebView

My app was rejected by Apple because "Login via Facebook" opens the Safari app, because I am using UIWebView for Facebook login, which is working fine. I am getting the access token as well.
The problem is I also need user information like user ID, email ID, user name etc. because I need to save it on my server.
How do I get the logged-in user's info when I have the access token?
Have you read the FB iOS documentation?
https://developers.facebook.com/docs/reference/ios/current/
There is an API called FBRequest which can retrieve various information or the Graph API can be used to obtain stuff.
How to integrate FB login with an iOS app is fully documented with example projects.

How to detect if a user comes from facebook or directly

let's say I have a website, which I'm also using as a facebook app (iframed page tab of a facebook page).
I need to know if the user has opened my site via the facebook app, or not, as I want to change some css and content only if opened in facebook.
Afaik I only get signed_request the first time the user opens the iframe on fb, so I "lose" it after the user navigates on my site.
Is there a better way to do this other than storing the signed_request in session?
Thanks in advance