meteor facebook login and set current user - meteor

I need a help or guide on this:
I am making a facebook app and I wish it to make in meteor.
When user opens my app, it automatically authenticates the user with facebook and pop ups dialogue box. And when user is authenticated or connected to facebook I want to save the user to meteor's user collection and set current user to facebook user.
I am new at meteor and didn't find a head point for this. Hope someone will guide me out.
Thank you..

I think automatic authentication is a bad practice both from UI perspective and from user perspective. If i open something, I want to be able to decide for myself if I want to authenticate a third party application with facebook so I'd have a button that promps people to signup with Facebook. You'll need:
accounts-password
accounts-facebook
service-configuration more info
Read through that flow and there is an example of setting a singup event up.

Related

Facebook PHP SDK, server-side login, without clicking any link (knowing password).

Can i log in to my Facebook account (Knowing user id and password), in the server using Facebook php-sdk, and without need to click any URL?
If yes, please explain.
It is against Facebook's Terms of Service to use a user's email address and password to login to their account. You should instead use the Facebook API to achieve this, but it requires manual login by a user.
There are ways of achieving automatic login using credentials, but since it's not allowed, I won't go into detail. Facebook also detects and prevents most of the common method of auto-login.

Signout User in Server Side Flow of Google+

I am using Google+ SignIn in my website, and utilizing server-side SignIn flow, as documented here.
After sending token to my server, i manage the User Session, by my own code and SignIn button or Script, doesn't appear in subsequent pages.
However, i have a logout button, that takes user out, but i don't know how to logout him, from Google+ at same time, preferably on my logut page.
NOTE: I want to logout user from my app, not the Google Services.
We don't think it's a good experience for your site to be able to log the user out of all Google services. Consider how annoying it would be for a user if all of their Google tabs (like GMail and Youtube) stopped working because they clicked a button your site.
We think you should offer a logout button that logs the user out of just your site.

Schedule and post comments to FaceBook wall using ASP.Net

i want to develop application like hootsuite . com
Schedule the FaceBook wall using ASP.Net
main question :
once user login in my system then he need to add his facebook user name and password once then how can i store that user's FB username and password because they need to Schedule and post comments to FaceBook wall so every time user will not login
can any once guide step by step ?
i hope you all help me
Thanks
once user login in my system then he need to add his facebook user name and password once then how can i store that user's FB username and password
This is completely the wrong approach – FB’s policies discourage users to share their login credentials with third-party services, and if your app will be caught asking for those, it will most likely be disabled quickly.
Get access tokens from the users, and use those to post.
https://developers.facebook.com/docs/authentication/, https://developers.facebook.com/roadmap/offline-access-removal/

Facebook login with ASP.NET

I am implementing Facebook login on my website. I am creating an asp.net user as well with the Facebook users details. This way I can control login in people to my site using .NET membership regardless of whether they are a Facebook user or not.
The problem I am facing now is security. When a user logs in with Facebook I am calling a webservice with their facebook details, if the user exists on the system (by their facebook userid) then I log them in. However as it stands anyone could call the webservice with someone elses facebook id and it would log them in (if that user existed on the system). Is there something that I can use to link the facebook user with my asp.net user that is only accessible to that user, such as an access token. It also needs to be something which does not change? Does facebook send back such a thing in the response object?
Any help or suggestions are much appreciated.
Thanks
Yes, we can get that profile data from Facebook. Using that requestAccessToken Url you can get that access token.
requestAccessTokenurl="https://graph.facebook.com/oauth/access_token?client_id={0} redirect_uri={1};client_secret={2};code={3}"
Also we can get the Profile Data using this access token
requestProfileUrl="https://graph.facebook.com/me"
please see this link- http://easyoauth.codeplex.com/
you can download the source code also :)
We have implemented for Facebook, Twitter, LinkedIn, Google using this framework. It is very straight forward. I can help you how to do this.
Thanks

How to - Facebook Connect with existing user table

I have a registration-login system on my own website yet I want to add Facebook Connect too. I have some required parts of my user table as:
Username
Password
Email
The first thing that came to my mind is, setting userId as username, userId#facebook.com as email and setting the password to null and check if a record exists with these details in my user table. If not insert a new user with these details, if exists return that user details.
Is this a good design? How should I connect facebook connect to my website?
Thank you
I would suggest you to take this into a more deep ASP.NET, and start an MVC project
then use the Microsoft Facebook API SDK to play around with the API, it's very easy and because they are using the new dynamic type, now that Facebook changed the Open Graph, it will continue to work great as well.
in your login page, add a facebook login button and ask for permissions, for example:
<fb:login-button perms="email" size="medium">
redirect-uri="http://yourdomain.com/FBLogin/"
Subscribe using Facebook</fb:login-button>
in your FBLogin controller, login the user using the FB credentials, if the user uses your normal form, use the normal login
If you create a custom MemberShip Provider, you can easily use that for both accesses... I write a simple start to a custom Membership provider here

Resources