How to post to Facebook user's profile? - c#

On my site, user's post goods for sale (similar to Craigslis). I want to create the capability for user's to have it post to their facebook profile automatically from my site.
The scenario I'm imagining is this.
User creates an account on my site. In their profile, they allow my site to post to their facebook profile. From then on, anytime they post an ad, it automatically posts it to the facebook profile as well.
What do I need to do to create that agreement between my site and their facebook profile?
How do I actually post it to facebook? I'm developing in .NET/C# on ASP.NET MVC
Been hearing multiple stories on how to do this, not quite sure which to take and run with. Thus, I'm asking the experts here on StackOverflow! Thanks in advance!

A few resources that you might find helpful to get started :
Facebook Developer Site - Documentation for the API, forums, etc.
Facebook Developer Toolkit - a .NET library that provides access to the Facebook API
If you're looking to provide integration with facebook features on your site, you might want to look into Facebook Connect and its capabilities..
A while back I was looking at Facebook Connect and ASP.NET MVC and found these links helpful as well:
Making Facebook Connect work with ASP.Net MVC
http://singulartechnologies.com/integration-of-facebook-connect-with-asp-net-mvc
http://singulartechnologies.com/custom-asp-net-mvc-authorization-with-facebook-connect

Related

ASP.NET Webpage with link to Confluence Wiki using Windows login credentials

I've been tasked with seeing if we can give users of our internal web application help links to documentation pages on our company's Confluence Wiki. But here's the problem, the requirement is that users should not have to log into Confluence because otherwise they won't bother using the help links (which is understandable). Is there a way to forward a user to Confluence and log them in with their current windows AD credentials? Every example of their api involves you supplying a username and password. We can't have that. If they are logged into our web app with their network cred, they should be able to see a page on our Confluence Wiki w/o logging in again.
Is this possible/practical or should we just use our own help docs system?
Note - when I log into our Confluence Wiki I use my Win AD credentials, so the two systems are connected. I just have no clue how to send a user and their credentials to their system from my asp.net webpage.
Thanks.
You want to configure your Confluence server to accept NTLM Authentication. I can't find the specific directions for Confluence, but given it shares backend code with Team City, you might find these directions helpful: https://confluence.jetbrains.com/display/TCD9/NTLM+HTTP+Authentication
At the very least hopefully this helps you find what to Google next.
By the way, You don't want to setup your website to forward credentials. It is possible, but your scenario is a simple website redirect. Credential forwarding would be if your are trying to talk to the server as an application server (and even then generally to be avoided).

Facebook API allowing deauthorization of application

I know this question has been asked in the past, but times have changed and I am hoping the facebook SDK has progressed. I have seen other websites with the ability to deauthorize their app from the website rather than having the user sign in to facebook to do it. An example is glassdoor.com. If you create an account and then sync your FB account you can then deauthorize on the Account page. Any ideas on how this works because I have searched facebook docs and find only the deauthorization callback.
In graph API you can issue an HTTP DELETE request to /UID/permissions to revoke authorization for an app. Or you can use auth.revokeAuthorization from legacy REST API.
https://developers.facebook.com/docs/reference/rest/auth.revokeAuthorization/
hope this helps

Integrate ASP.NET Forms Authentication with Third-Party Forums

I know a lot of free/open-source ASP.NET Forum modules on the web. However, I don't know if any of them support integration of existing Forms Authentication on a website?
e.g. You already have an existing ASP.NET Website, with User Login and Registration, and you already have existing users registered.
All you want to do is add a Forum support to it and users should be able to use their existing log-in to post messages in the Forum.
Any ideas?
Thanks all in advance!
Try Nearforums, you can authenticate your users with asp.net membership or create a custom sso with your main site.
Disclaimer: I'm a Nearforums project team member.

Facebook website integration - what's actually possible in terms of custom website features

I know there are a lot of questions out there for facebook integration, and a lot can be read of off developers.facebook.com - which I did. But I'm missing some clear and precise answers as to what I can actually do in terms of my project.
So I know I can connect my website with a facebook account, and as far as I can read it's possible to "attach" a facebook account to a user in my own custom user-database. Correct?
I'm looking primarily to be able to do this, but not necessarily require the user to have a facebook account to use my app. And as far as I've understood, this is possible too.
To provide context I'm building a specialized photo sharing app.
Where it gets iffy for me, is if I choose to have the ability to comment on a picture on my app. I know there is the social plugin "Comments" for facebook, but how exactly would this work? It would store the comments in facebook would it not? And if a user with no facebook account registers at my site, he won't be able to use the comment feature? Can he even see the comments? Is it at all possible 'hook up' facebook comments to a custom comment-feature on my site? So the user without facebook can still comment?
And this whole integration - would it require the user to 'install' a facebook app (mine) on facebook?
"So I know I can connect my website with a facebook account, and as far as I can read it's possible to "attach" a facebook account to a user in my own custom user-database. Correct?"
Correct, you use the userid that Facebook provides to identify the user.
"I'm looking primarily to be able to do this, but not necessarily require the user to have a facebook account to use my app. And as far as I've understood, this is possible too."
Yes, you just need to built the extra functionality into your app (allow for registrations coming from FB or a regular form from your website). You might want to have a look at Facebook's registration plugin.
"The plugin also allows users who do not have a Facebook account, or do not wish to sign up for your site using Facebook to use the same form as those who are connecting with Facebook. This eliminates the need to provide two separate login experiences."
"I know there is the social plugin "Comments" for facebook, but how exactly would this work? It would store the comments in facebook would it not?"
Yes, it stores them on FB, but you can access them and replicate them into your database via the Graph API. Read this for details.
"And if a user with no facebook account registers at my site, he won't be able to use the comment feature? Can he even see the comments? Is it at all possible 'hook up' facebook comments to a custom comment-feature on my site? So the user without facebook can still comment?"
The comments feature will not be tied to your site's registration, since it does a separate auth check. Unfortunately, the comment plugin does not support anonymous comments, or pushing comments into it from another app, so a user will have to have an account in Facebook, Yahoo, AOL or Hotmail to post a comment. But all users will be able to see the comments, regardless of account status (you can control that from your code of course - e.g. hide the comment plugin for a user group).
Besides FB's plugin you can have a look at other solutions like Disqus (http://disqus.com/), which supports multiple login sources AND allows for anonymous comments if you want.

Facebook.net C# SDK and login into Asp.net website

Can I achive the following with the "Facebook.net C# SDK"?
•Allow users to register in my asp.net site using their facebook credentials.
•Retrieve facebook client information. Like (Name, surname, email address etc). So I can import this information into my application.
•Allow users to log into my site using facebook credentials.
Thanks
All of the above is easily possible.
I think that this resource offers a good tutorial on how to integrate with Facebook's user infrastructure:
http://devtacular.com/articles/bkonrad/how-to-retrieve-user-data-from-facebook-connect-in-aspnet/
There is also this code example / framework which takes you though much of the process:
http://fbconnectauth.codeplex.com/
And this walkthrough which is a little more up-to-date:
http://area72.ro/general-it/how-to-login-via-facebook-in-asp-net.html
Yes, review the Facebook Documentation for more details.

Categories

Resources