React-Native get facebook thumbnail from contacts


#1

Hi guys,

I'm using react-native-contacts and the Facebook API. I've been searching to see whether I can detect if a contact from a mobile phone is using Facebook. And if it is, then load up the facebook profile thumbnail to the contact on my app. But unfortunately I haven't had any luck when searching. Is this even possible?

Thanks


#2

Can you investigate document.referrer to find out where they're coming from?


#3

Hi Paul,

Since I'm using React-Native, I'm unable to log document.referrer. And when you say where they're coming from, do you mean what the values returns when I get contacts in React-Native? Apologies, I probably misunderstood.


#4

Can you add on https://www.npmjs.com/package/react-native-referrer ?

Yes - if the referrer string has "facebook.com" somewhere within it, then it's a fairly save bet that they're coming from facebook.


#5

Got it working now. Thanks for the link.

After investigating, I haven't seen the referrer string that has "facebook.com" or "fb", unfortunately. Doing some research on the Gaph Api, it looks like I would be unable to look up the contacts by the email or phone number to see if it matches with the contacts on the phone it seems.

Thanks for helping me out, Paul.


closed #6

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.