Retrieving Facebook User Profile Profile

I am creating a registry site so people can easily find each other. I don't want to use Facebook Connect as my primary registration method or use Facebook to store their information. I will be creating a database at my end to store this information. For security reasons, I will not display the user's address, phone number or email address, so I would like to provide the next best way for people to connect with each other, this is where Facebook comes in. I usually just ask them to enter their Facebook URL in the textbox, but I don't think most people know what their URL is, so I think I need to use Facebook Connect. So here is my idea ... When users subscribe, there is a checkbox which, when checked, meansthat they allow people to find them on Facebook. My guess is that as soon as they click on the register button, a Facebook Connect popup will appear asking them to allow access to their Facebook account. When they "allow" it, I can get their profile. All I need is their Facebook profile, I don't want any other Facebook features or information. Is Facebook Connect the best one to use in this scenario? Is there an easier way? A few months ago on Facebook Connect they were examples of this, but all the documentation has been rearranged and changed and I can't find the information. Any help you can provide would be great!a Facebook Connect popup will appear asking them to allow access to their Facebook account. When they "allow" it, I can get their profile. All I need is their Facebook profile, I don't want any other Facebook features or information. Is Facebook Connect the best one to use in this scenario? Is there an easier way? A few months ago on Facebook Connect they were examples of this, but all the documentation has been rearranged and changed and I can't find the information. Any help you can provide would be great!a Facebook Connect popup will appear asking them to allow access to their Facebook account. When they "allow" it, I can get their profile. All I need is their Facebook profile, I don't want any other Facebook features or information. Is Facebook Connect the best one to use in this scenario? Is there an easier way? They were examples of this on Facebook Connect a few months ago, but all the documentation has been rearranged and changed and I can't find the information. Any help you can provide would be great!Is Facebook Connect the best one to use in this scenario? Is there an easier way? A few months ago on Facebook Connect they were examples of this, but all the documentation has been rearranged and changed and I can't find the information. Any help you can provide would be great!Is Facebook Connect the best one to use in this scenario? Is there an easier way? A few months ago on Facebook Connect they were examples of this, but all the documentation has been rearranged and changed and I can't find the information. Any help you can provide would be great!

+2


a source to share


1 answer


An easy way to do this would be to query the user for his FB username

. This is not a private field and anyone would like to share it. Then the profile link will be just http://www.facebook.com/<username>

as you already know.

However, it is possible that the user may not have a Facebook username. In this case, you will need to add the FB connect button to your site. But you can keep it simple. Once the user connects, you will receive it UID

. Just make a request GET

to the url http://graph.facebook.com/<UID>

and you will get the profile url in the link field of the returned JSON.



To get an idea, just open this in your browser - http://graph.facebook.com/546159339

0


a source







All Articles