views:

72

answers:

4

I am totally lost finding the right API to create a sign up process like Foursquare. I am attaching a document of what I am trying to do. I have already tried OAuth, JavascriptSDK, Facebook.NET API from Codeplex and FacebookToolkit.NET from Microsoft. Nothing looks what I actually need. I think some one experienced can lean me towards where I should go straight.

https://docs.google.com/fileview?id=0B6mlBkccI34zNDNmMGMyNTYtMDY2NS00NmEwLTlkMjQtZjA5NmVmZDMzYzlj&hl=en&authkey=CNPH9LEL

Note: I am trying to achieve this via ASP.NET with C#.

A: 

You are looking for the Facebook Connect API.

More info for the single login process can be found here

mcabral
isn't it GraphAPI that you are talking about?
Umair Ashraf
doble checked. i used to know this API as the Facebook Connect API. Seems things have changed, its been a while since ive worked on this subject. sorry for the misunderstanding.
mcabral
Ok that updated your knowledge and you probably should raise a positive vote for that question against me.
Umair Ashraf
I'd rather upvote your comment since it was the comment what triggered the update process. Following the same line of thougth you provide, you should probably accept more answers for your questions since the community has given you valuable time and knowledge. Cheers! :)
mcabral
A: 

You could also leverage OpenID

Robert Williams
you mean to say Foursquare like Sign Up functionality can be gotten by OpenID?
Umair Ashraf
I've never used Foursquare, but I know OpenID will let you authenticate users via another site that uses OpenID (there are several) and you have the ability to retreive user information from the OpenID provider if the end user allows that type of itegration.Check this out for ideas:https://wiki.openid.net/Gallery
Robert Williams
Since you're using ASP.NET and C#, you can use this OpenID provider:http://dotnetopenauth.net/
Robert Williams
I am even familiar with OpenID and this doesn't fulfill my requirements either. I can get particular user information no doubt but I can't get Facebook friends, I can't have a feature to invite user's friends.
Umair Ashraf
I am specifically looking for Facebook API. Although you aren't familiar with Foursqaure but my question updated your knowledge and you probably should raise a positive vote for that question against me.
Umair Ashraf
A: 

Your document notes the Yelp signup process, which is very low friction and allows the user's information to be available to the website without having to go through Facebook's authentication process.

Yelp, Microsoft Docs, and Pandora are using a feature of Facebook called Instant Personalization. Instant Personalization is not available to developers as of yet and is only available to those three partners.

That being said, you likely would need to use the Facebook Login Button to allow the user to grant you access to their information (including their friends list).

As far as the process of getting a list of friends, use the graph call "me/friends"

I manage FaceSharp, a .NET open source project to help people get started with Facebook Development and will be adding functionality similar to what you are looking to do in the future, perhaps some of that code will help you in your efforts. It's under the MIT license, so take whatever you want.

Patrick Gidich
My document notes the Yelp as well as Foursqaure. You knwo I tried 2 Facebook.NET APIs from Codeplex and they looked to have no active community so far. As you mentioned FaceSahrp, I should give it a try and would like to contribute too. In my opinion, I can get the logged-in user information using OAuth and Friends as well. I must write my own control for invitation and finding friends. And that control I would like to add in your API.
Umair Ashraf
+5  A: 

Hello ,

Facebook Graph Api is the best.The url is http://developers.facebook.com/docs/api

The Graph API uses OAuth 2.0 for authorization. Check out the authentication guide for the details of Facebook's OAuth 2.0 implementation.

OAuth 2.0 is a simpler version of OAuth that leverages SSL for API communication instead of relying on complex URL signature schemes and token exchanges. At a high level, using OAuth 2.0 entails getting an access token for a Facebook user via a redirect to Facebook. After you obtain the access token for a user, you can perform authorized requests on behalf of that user by including the access token in your Graph API requests:

https://graph.facebook.com/220439?access_token=...

Check out the PHP example code or the Python example code on GitHub to see a complete example of obtaining an access token for the current user. The steps to obtain an access token are:

*

  Register your application to get an app ID and secret. Your Facebook app ID is your client_id and your Facebook application secret is your client_secret.
*

  Redirect the user to https://graph.facebook.com/oauth/authorize with your client_id and the redirect_uri. The redirect_uri parameter needs to begin with your app's URL. For instance, if your URL is http://www.example.com then your redirect URI could be http://www.example.com/oauth_redirect.

https://graph.facebook.com/oauth/authorize? client_id=...& redirect_uri=http://www.example.com/oauth_redirect

* After the user authorizes your application, we redirect the user back to the redirect URI you specified with a verification string in the argument code, which can be exchanged for an oauth access token. Exchange it for an access token by fetching https://graph.facebook.com/oauth/access_token. Pass the exact same redirect_uri as in the previous step:

https://graph.facebook.com/oauth/access_token? client_id=...& redirect_uri=http://www.example.com/oauth_redirect& client_secret=...& code=...

* Use the access token returned by the request above to make requests on behalf of the user:

https://graph.facebook.com/me?access_token=...

PrateekSaluja
Yes. You are very near to correct. In fact, I am currently using this API and already have written .NET wrapper for it. Although this is working perfect but when I look at extended permission for OAuth it is mentioned there that one can't get user's email (This is not available). Am I wrong?
Umair Ashraf
PrateekSaluja
well the steps you mentioned I've already done. can you tell me why this doesn't work for me? http://fwd4.me/bOY
Umair Ashraf
Hey Man!Given link is for FBML.I have given the link for Graph API.Both are different.You should follow either Graph API or FBML.
PrateekSaluja