public string GetGPusData(string UserId, string ProfileId) { Domain.Socioboard.Domain.GooglePlusAccount _GooglePlusAccount = objGooglePlusAccountRepository.GetGooglePlusAccount(Guid.Parse(UserId), ProfileId); GetGoogleplusCircles(UserId, ProfileId); GetUserActivities(_GooglePlusAccount.UserId.ToString(), _GooglePlusAccount.GpUserId, _GooglePlusAccount.AccessToken); return("Gplus Account Updated Successfully"); }
public string GetGPusData(string UserId, string ProfileId) { Domain.Socioboard.Domain.GooglePlusAccount _GooglePlusAccount = objGooglePlusAccountRepository.GetGooglePlusAccount(Guid.Parse(UserId), ProfileId); //oAuthToken objToken = new oAuthToken(); oAuthTokenGPlus objToken = new oAuthTokenGPlus(); string finalToken = string.Empty; string finaltoken = objToken.GetAccessToken(_GooglePlusAccount.RefreshToken); try { JObject objArray = JObject.Parse(finaltoken); finalToken = objArray["access_token"].ToString(); GetGoogleplusCircles(UserId, ProfileId, finalToken); GetUserActivities(_GooglePlusAccount.UserId.ToString(), _GooglePlusAccount.GpUserId, finalToken, 0); // break; } catch (Exception ex) { Console.WriteLine(ex.StackTrace); } return("Gplus Account Updated Successfully"); }