Login with facebook and storing important user information - facebook

The facebook "wave" has finally hit me and I see that it's now time to integrate the wonders of the Facebook API into my site. I'm a little worried about implementing a "Login with Facebook" button because my site stores information about each user, and I'm not sure whether or not the facebook login system will also store said information. Any user who registers to my site has the ability to "like" certain pages that were found while browsing the site, and the categories of each page the user likes is stored and linked to his username.
If the user were to "login with facebook" however, and thus skip my registration page, would the information about categories still be saved?
Even looking at StackOverflow.com, I notice that all of my profile information etc. is being saved, but where? I used the login with facebook button so where exactly is my profile information being saved?

When you login with Facebook your site gets a Facebook ID and some other information (depending on what you ask for, but normally first name, last name, email address). You can then use the Facebook ID or email address to link it to an existing account in your system. If you can't find it, automatically create a new account with the details provided from Facebook.

You can use the Registration Social Plugin that facebook offer in order to get the data you need from the user while they register to your site using their facebook profile.
Also, as #JonGrant wrote, you can just use the api to get the needed information from facebook, just take into consideration that the more permissions you ask for, the less users will authorize your app.
Edit: Plugin now out of date, please refer to Facebook Login.
This was plugin removed as of API version 2.0. It will stop working
on July 30, 2015. Apps using this plugin should migrate to Facebook Login.
Source: facebook docs

Related

Share Facebook profile after Login - user_link

We have a platform where users get logged in with Facebook. Now on customers demand, we want to provide a feature where we will request logged in users profile link at the time of login via user_link permission and user can share that link to anyone with just one tap. And on the other end, the other user who will receive this link will able to see (on facebook app or on Web) the sender's profile and if interested they can get connected.
But the issue is, I am not able to see user profile got as user_link. Its seems like I can only use this link if he or she is already my friend. If so then how can I implement this feature in my app? also if I am wrong at any point please correct me.
Its seems like I can only use this link if he or she is already my friend.
That’s exactly what the documentation says, https://developers.facebook.com/docs/graph-api/reference/user:
link: A link to the person's Timeline. The link will only resolve if the person clicking the link is logged into Facebook and is a friend of the person whose profile is being viewed.
-
If so then how can I implement this feature in my app?
You can’t; Facebook has deliberately designed this feature with this restriction, to better protect people’s privacy.

How to automatically post to Facebook

Please could you help. I have created a website that allows people to upload listings of items they are selling. I want to know how to add the feature where when someone creates a listing, it automatically posts on the user's FB page, with a link to the listing on our website. Is this possible? Would the user have to log into our website using their FB account for this to happen? Thanks everyone for your help.
Martin
You need to create a Facebook App and use Facebook Graph API with publish_actions permissions to do that. Note that the facebook rules prohibit sending fully automated messages that the user has no control, your user must have the ability to edit the message before sending

Facebook: How to post on own page using graph api without login

I own a blog like website, and as part of promotions I have a corresponding facebook page. My website contents are dynamic & when it gets updated(through a bot), I want the facebook page also to be updated by an automated post/publish from the bot which shows up the updates to the page viewers.
I could create a facebook page, and my bot programme which updates the web content is also able to publish the content on my facebook page using graph apis. But the posts are not publicly visible(Visible to only me/admin).
I could learn that it could be because my app through which my bot program is publishing to my facebook page is not public.
App->Status & Review, Status (Tab)
(Do you want to make this app and all its live features available to the general public?).
To make the app public, there is a review process which checks the facebook login button used in the website but my posts are through a backend bot and not through user action. My website is like a blog without user authentication so can't think of adding a login there.
Is it possible without having user login on the page? Also, If I post using twitter apis and link/configure my twitter account to my facebook page, it works.I guess this is not a new problem and many brands have automated it already, so need to understand how.
Am I missing something?
Apologies: I have checked previous posts on the same topic, but couldn't find relevant answers for the current Facebook version & policies.
Without the Login Review process, your posts can not be visible to the public.
To get it working, just send your page management tool (with the login dialog) for the review. Once they review it and accepted, you may change the flow a bit eg: skip the login part and allow auto posting.

What type of application to choose

I want to create facebook application that will allow to insert some data from my site to user's profile. User can choose to set up application. The users enters his ID on my site and when user's profile is viewed there is block of data loaded from my site (specified to the ID).
Is this possible to create such application with facebook ? If no the what type of application is closest to this? My site users want to display their profiles from my site inside their facebook profiles , so facebook friends can see this.
If I understand you correctly you want to add some additional data on the users Facebook profile, something like if Stackoverflow would add their flair on the Facebook profile.
I don't think this is possible, but you have a few alternatives:
Make the user post out a link to his profile on your site to his Facebook Wall, more details here.
Integrate your site to the new Open Graph Objects. Open Graph Objects will create a box on the users profile for your application which shows the users activity in your application. You should check out the demos and documentation for more information about this.
The users enters his ID on my site and when user's profile is viewed there is block of data loaded from my site
You can't do anything like this, you will need to use the authentication flow provided by Facebook in order to get access to the Facebook user data and then tie up the Facebook user to "your user", see documentation.
When it comes to what type of app you should create, there is basically only one type of app with some different options. But you should focus on the "Facebook for websites" documentation.

Facebook API Registration

1)If two users(A & B) logs into the website(http://site.com). Both(A & B) have registered in the website with normal user registration (not FB register). Both(A & B) will have access to all parts of the site with all user provisions.They can write their reviews in the website and can do so and so.This is happening right now.
Note:Let us assume the users A and B are already friends in the Facebook.But they don't know each other in our website.
2)If two users(X & Y) logs into the website. Both(X & Y) have registered in the website with facebook registration. Both(X & Y) will have access to all parts of the site with all user provisions.They can write their reviews in the website and can do so and so.This is happening right now.
Note:Let us assume the users X and Y are already friends in the Facebook.But they don't know each other in our website.
What i am going to do:
a)If the user A logs into the system, we need to show facebook login button in some page to link his facebook account. If he wish to link , he need to give his FB login details,then we need to show the friends of him who are all also the users of my website. He may have so many friends with his facebook account, but in this part we need to show B details because he is already user of the site and also his facebook friend as we stated above.
If the user A has someother facebook friends(D,E,F) who are also registered users in our site then we will need to show all of those user details with their recent activity in the website under his FB linking page.
2)This is the samething need to do for FB registered users(X,Y) also.(Similar to http://runkeeper.com)
Technical Agenda:
1)First type of user(A,B):
During the linking of facebook(facebook login), we are going to update the user table row values with his facebook details and then we need to show his FB friends activity in the website by using the FB session data created for his/her FB login and now i will be able to show his Friendslist.
Problem:
The same user(A or B) logout from the website and relogin with his user login details. In the user table we already having his facebook id details, using that we need to show all of his FB friends. The Facebook api uses the Session value to show the datas with the api call like $frnd=$facebook->api('/me').Now there is no session for this user.
Please suggest me anyway to come up with this technical part , because there is no clear documentation to follow .
2)Second type of user(X,Y):
They are going to login with the existing FB details to the site, we need to just show there FB friend activity in the website.
This is definitely possible as you describe. What web platform are you using for your site. PHP, ASP.NET, or another? As you have experienced, the documentation is sometimes lacking. If you are using php, it will likely be a little easier to get everything working, because the examples all seem to be in php.
I will have to give you a more detailed answer tomorrow, but I will need to know which platform you are using for your website. Also, it wasn't very clear to me, did you say that users are already logging in to your site using facebook authentication?
Eric