Schedule and post comments to FaceBook wall using ASP.Net - 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/

Related

Is there any standard for the following type of authentication

We are partner to another company. We developed an asp.net site with membership as the provider. Our partner company requests the following. The users would log in to their site through their UI. Once the user is logged in, there is a link to our site. They want to bypass our login screen and let the users get into our site after they authenticate the user. Is there any standard for this? I checked openid, but it didn't seem like a quite fit. As far as I understood, in openid, there needs to be a link in our login page saying "Login using Company X". Then when the user clicks that the user is taken to Company X login page. Once the user is authenticated is redirected to the link we provided and the user is authenticated. Our partner company doesn't want the user to come to our login page. I still want to use everything that membership provides such as roles.
You might want to look at Claim Based Authentication.
Basically, you can redirect a user to your Partner Site. The user logins at their site, and then your Partner issues security token.
You can download the book - A Guide to Claims-Based Identity and Access Control, Second Edition - Book Download
Source: about slide is from PluralSight - Identity and Access Control in ASP.NET 4.5

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

Facebook/Twitter login in my application

I am developing my site and in my site I want users to login through their
social network credentials like Facebook and Twitter.
How should I track these users whenever they do any event on my site? Suppose a user logs in with Facebook username & password, and now he is redirected to the next page. On that page, we are doing some activity like 'add something'. How to track this?
Is there any procedure for working with this?
The common practice is to associate user's Facebook or Twitter account with your internal account and then track all user activity via your internal account id. If the newly logged in user doesn't have an internal account, then silently create it from Facebook/Twitter data and auto-associate.
Btw, integrating your ASP.Net app with Facebook and Twitter will be easier using Facebook C# SDK for Facebook and Twitterizer for Twitter.
Have a look a the OAuth C# Library
http://www.matlus.com/oauth-c-library/

Can the Facebook C# SDK support these typical site login/registration scenarios?

I want to support the following scenarios on my ASP.NET MVC website:
First time visitor wants to
register, via facebook connect. I'd
like the user to have an entry in my
user membership table - so I have
them enter a username/password
(email gets populated via facebook
connect).
Registered user returns to my
site, logged into facebook already.
I'd like my site to see they're
logged into facebook already and
auto log them into my membership
system.
Registered user returns to my
site, but is not logged into
facebook. I'd like to give them two
options: to log into my site
directly or use facebook connect.
Extra:
After a user has connected their
facebook account to my site, I'd
like to use their facebook profile
photo throughout my site where the
user has participated.
I'd also like to post a bit of text, maybe even a photo, to the user's wall (when they perform an action of course).
Couple questions:
What should I store to tie the user's id in my membership system to their facebook account? I'm assuming it would be their facebook user id.
Can this facebook C# SDK handle these scenarios?
Yes you would store their Facebook Id and Yes the API can support this.

Resources