public ActionResult Index() { // Making sure the application is configured correctly and the application is called from a canvas // Delete this code once this is done try { var appId = _applicationSettings.AppId; var appSecret = _applicationSettings.AppSecret; } catch (ConfigurationErrorsException) { return(Redirect("/landing")); } if (_platformTokenProvider.Get() == null) { return(Redirect("/landing")); } var currentUser = _usersApi.Current(); var currentUserFollowing = _usersApi.GetFollowing(currentUser.Id); return(View(ToModel(currentUser, currentUserFollowing))); }
private void AddContextParameters(NameValueCollection serviceParameters) { serviceParameters.Add("token", _platformTokenProvider.Get()); serviceParameters.Add("hash", _platformTokenProvider.GetHash()); }
public string GetHash() { return(new SignatureBuilder() .Append(_platfromTokenProvider.Get() + _applicationSettings.AppSecret) .Create()); }