I originally used .net sdk for facebook, which can be found here:
http://facebooktoolkit.codeplex.com/
but now I'm trying to upgrade to the latest version, which is posted below, and implements many of the new facebook features that were recently:
http://facebooksdk.codeplex.com/
Despite the fact that I created several applications for facebook canvas and even integrated our companyโs website in order to use facebook connection, I still got a little confused about the nuances and details about facebook authentication / authorization changes. For example, how can I transfer the .NET .NET server code below, which I used from our old (v3.0) .NET SDK integration with Facebook, to the new v5.0.NET SDK?
string perm = "publish_stream";
FBConnectAuthentication auth = new FBConnectAuthentication(Settings.FBConnectAPIKey, Settings.FBConnectAPISecret);
FBConnectSession fbSession = auth.GetSession();
string userId = fbSession.UserID;
var session = new Facebook.Session.ConnectSession(Settings.FBConnectAPIKey, Settings.FBConnectAPISecret);
var api = new Facebook.Rest.Api(session);
var usr = SessionInfo.CurrentUserOrUserAccountWithLastEmailAddressEntered;
Facebook.Schema.Enums.ExtendedPermissions perm
= (Facebook.Schema.Enums.ExtendedPermissions)Enum.Parse(typeof(Facebook.Schema.Enums.ExtendedPermissions), permission);
hasPermission = api.Users.HasAppPermission(perm);
REST apis, sdk OAuth access_token?
, -, , javascript:
FB.Connect.showPermissionDialog('publish_stream, email, user_checkins', publishToWallPermissionGranted);
function publishToWallPermissionGranted() {
FB.Connect.streamPublish('some share message', null, null, null, false, null);
}
, access_token , , ?
, , Oauth ( , ) appId javascript FB- (.. FB.init()) api- .
!