Skip to content

Commit

Permalink
Socioboard 3.0
Browse files Browse the repository at this point in the history
github changes
-------------------
-Report submodules are invisible sometimes issue fixed
-Feeds inside submodules hidden issue fixed
-Socioqueue after delete all schedule messages check box issue fixed
-After cancel the popup in socioqueue the cancel button issue fixed
-Dashboard compose message chech all issue fixed
-Facebook group post and Linkedin group post 1 click profiles checkbox
issue fixed
- Link shortening setting temporary used issue fixed
-Pinterest accpunt profile name is not coming in profiles issue fixed
-Socioboard download plugin arrow mark opening bar issue fixed
-Agency page text is not visible exactly issue fixed
-Youtube custom reports in sidebar is not visible appropriately
sometimes issue fixed
-Changes in dashoboard for pintrest profile issue
-changes in profile page
-Introduce new feature cancel plan in billing
-More detail for current plan
-Redirect to post in report
-More detail in twitter feeds report
-Introduce new daywise scheduling
-Changes in all reports module
-Add facebook feeds new feature for max like least count,max comment
,least commentshorting
-Resocio issue solved in all feeds
-Add a facebook Page issue solved
-Landing page company career ui issue
-facebook and twitter video posting implemataion.
-changes in datascheduler  for video posting.
-modification in billing setion for invoice download.
  • Loading branch information
socioboard committed Jul 10, 2017
1 parent b070aa2 commit 0ed035e
Show file tree
Hide file tree
Showing 236 changed files with 55,111 additions and 2,368 deletions.
Binary file modified .vs/Socioboard/v14/.suo
Binary file not shown.
11 changes: 3 additions & 8 deletions .vs/restore.dg
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
#:E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SocioboardDataServices\SocioboardDataServices.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SocioboardDataServices\SocioboardDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Domain.Socioboard\Domain.Socioboard.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SocioboardDataServices\SocioboardDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Facebook\Socioboard.Facebook.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SocioboardDataServices\SocioboardDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Google\Socioboard.Google.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SocioboardDataServices\SocioboardDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Instagram\Socioboard.Instagram.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SocioboardDataServices\SocioboardDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.LinkedIn\Socioboard.LinkedIn.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SocioboardDataServices\SocioboardDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Twitter\Socioboard.Twitter.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SocioboardDataServices\SocioboardDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Pinterest\Socioboard.Pinterest.xproj
#:E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard\Socioboard.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard\Socioboard.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Facebook\Socioboard.Facebook.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard\Socioboard.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Pinterest\Socioboard.Pinterest.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Facebook\Socioboard.Facebook.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Domain.Socioboard\Domain.Socioboard.xproj
6 changes: 5 additions & 1 deletion src/Api.Socioboard/Controllers/FacebookController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,11 @@ public IActionResult GetFeeds(string profileId, long userId, int skip, int count
}
return Ok();
}

[HttpGet("Shortfeeds")]
public IActionResult Shortfeeds(string profileId, long userId, int skip, int count, string typeShort)
{
return Ok(Repositories.FacebookRepository.GetFacebookSort(profileId, userId, _redisCache, _appSettings, skip, count, typeShort));
}

[HttpGet("GetTopFeeds")]
public IActionResult GetTopFeeds(string profileId, long userId, int skip, int count)
Expand Down
3 changes: 1 addition & 2 deletions src/Api.Socioboard/Controllers/GoogleController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public IActionResult EnableDisableGoogleSignIn(long userId, bool checkEnable)
{
if (checkEnable)
{
return Ok("Cool! Social SignIn has Enable for your Goole Account ");
return Ok("Cool! Social SignIn has Enable for your Google Account ");
}
else
{
Expand Down Expand Up @@ -447,7 +447,6 @@ public IActionResult GoogleLoginPhone(string refreshToken,string accessToken, Do
[HttpPost("AddGoogleAccountPhone")]
public IActionResult AddGoogleAccountPhone(string refreshToken, string accessToken, long groupId, long userId)
{

string ret = string.Empty;
string objRefresh = string.Empty;
DatabaseRepository dbr = new DatabaseRepository(_logger, _appEnv);
Expand Down
6 changes: 6 additions & 0 deletions src/Api.Socioboard/Controllers/GroupProfilesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ public IActionResult GetAllGroupProfiles(long groupId)
return Ok(GroupProfilesRepository.getAllGroupProfiles(groupId, _redisCache, dbr));
}

[HttpGet("GetTop3GroupProfiles")]
public IActionResult GetTop3GroupProfiles(long groupId)
{
DatabaseRepository dbr = new DatabaseRepository(_logger, _appEnv);
return Ok(GroupProfilesRepository.getTop3GroupProfiles(groupId, _redisCache, dbr));
}
[HttpGet("GetAllGroupProfilesDeatails")]
public IActionResult GetAllGroupProfilesDeatails(long groupId)
{
Expand Down
16 changes: 15 additions & 1 deletion src/Api.Socioboard/Controllers/PaymentTransactionController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.AspNetCore.Hosting;
using Domain.Socioboard.Models;
using Domain.Socioboard.Interfaces.Services;
using System.Threading;


// For more information on enabling Web API for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860

Expand Down Expand Up @@ -40,6 +40,15 @@ public IActionResult GetPackage(string packagename)
return Ok(Repositories.PaymentTransactionRepository.GetPackage(packagename, dbr));
}


[HttpPost("GetPaymentTransactiondata")]
public IActionResult GetPaymentTransactiondata(long id)
{
Model.DatabaseRepository dbr = new Model.DatabaseRepository(_logger, _appEnv);
Domain.Socioboard.Models.PaymentTransaction _PaymentTransaction = dbr.Find<Domain.Socioboard.Models.PaymentTransaction>(t => t.id == id).FirstOrDefault();
return Ok(_PaymentTransaction);
}

[HttpPost("UpgradeAccount")]
public IActionResult UpgradeAccount(string userId, string amount, string UserName, string email, Domain.Socioboard.Enum.PaymentType PaymentType, string trasactionId, string paymentId, Domain.Socioboard.Enum.SBAccountType accType, DateTime subscr_date, string payer_email, string Payername, string payment_status, string item_name, string media)
{
Expand Down Expand Up @@ -179,6 +188,8 @@ public IActionResult UpgradeAccount(string userId, string amount, string UserNam
return Ok();
}



[HttpPost("UpdateRecurringUser")]
public IActionResult UpdateRecurringUser(string subscr_id, string txn_id, DateTime subscr_date, string payer_email, string Payername, string payment_status, string item_name, string amount,string media)
{
Expand Down Expand Up @@ -221,5 +232,8 @@ public IActionResult UpdateRecurringUser(string subscr_id, string txn_id, DateTi
}
return Ok();
}



}
}
3 changes: 1 addition & 2 deletions src/Api.Socioboard/Controllers/SocialMessagesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public SocialMessagesController(ILogger<FacebookController> logger, Microsoft.Ex
private Helper.Cache _redisCache;
private readonly IHostingEnvironment _appEnv;


/// <summary>
/// To compose message
/// </summary>
Expand Down Expand Up @@ -107,7 +106,7 @@ public async Task<IActionResult> ComposeMessage(string message, string profileId
uploads = imagePath;
}
}

}
}
else if (!string.IsNullOrEmpty(imagePath))
Expand Down
59 changes: 58 additions & 1 deletion src/Api.Socioboard/Controllers/UserController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,55 @@ public IActionResult GetNewsLetter()

}

[HttpGet("CancelPlan")]
public IActionResult CancelPlan(long id)
{
try
{
// string profileid = "I-6BRCLEX1BPLF";
Model.DatabaseRepository dbr = new Model.DatabaseRepository(_logger, _appEnv);
User _user = dbr.Single<User>(t => t.Id == id);
PaymentTransaction _paymentdetail = dbr.Single<PaymentTransaction>(t => t.userid == id);
if (_user != null)
{
string msg = Repositories.PaymentTransactionRepository.CancelRecurringPayment(_paymentdetail.paymentId, _user.Id, dbr);
if (msg == "Success")
{

_user.AccountType = Domain.Socioboard.Enum.SBAccountType.Free;
_user.PaymentStatus = Domain.Socioboard.Enum.SBPaymentStatus.UnPaid;
_user.PayPalAccountStatus = Domain.Socioboard.Enum.PayPalAccountStatus.notadded;
_user.PaymentType = Domain.Socioboard.Enum.PaymentType.paypal;
_user.TrailStatus = Domain.Socioboard.Enum.UserTrailStatus.free;
int res = dbr.Update<User>(_user);
if (res == 1)
{
return Ok("Your plan Canceled Sucessfully");
}
else
{
return BadRequest("Issue while canceling your plan.");
}
}
else
{
return BadRequest("Failed to cancel your plan please try after some time");
}


}
else
{
return BadRequest("Something went wrong");
}
}
catch(Exception ex)
{
return BadRequest("Something went wrong");
}

}


[HttpPost("UpdatePackageAdmin")]
public IActionResult UpdatePackageAdmin(string amount, long id)
Expand Down Expand Up @@ -2261,7 +2310,15 @@ public static string getBetween(string strSource, string strStart, string strEnd
}
}


[HttpPost("UpdateurlShortnerStatus")]
public string UpdateurlShortnerStatus(long userId, Domain.Socioboard.Enum.UrlShortener staTus)
{
DatabaseRepository dbr = new DatabaseRepository(_logger, _appEnv);
User userTemp = dbr.Single<User>(t => t.Id == userId);
userTemp.urlShortnerStatus = staTus;
dbr.Update<Domain.Socioboard.Models.User>(userTemp);
return "Ok";
}

}
}
Expand Down
55 changes: 40 additions & 15 deletions src/Api.Socioboard/Helper/FacebookHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public static string ComposeMessage(Domain.Socioboard.Enum.FbProfileType profile
{

string ret = "";

FacebookClient fb = new FacebookClient();
fb.AccessToken = accessToken;
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls;
Expand All @@ -44,21 +43,45 @@ public static string ComposeMessage(Domain.Socioboard.Enum.FbProfileType profile
{
if (!string.IsNullOrEmpty(imagePath))
{
Uri u = new Uri(imagePath);
string filename = string.Empty;
string extension = string.Empty;
extension = System.IO.Path.GetExtension(u.AbsolutePath).Replace(".", "");
var media = new FacebookMediaObject
if(!imagePath.Contains("mp4") && !imagePath.Contains("mov") && !imagePath.Contains("mpeg") && !imagePath.Contains("wmv") && !imagePath.Contains("avi") && !imagePath.Contains("flv") && !imagePath.Contains("3gp"))
{
FileName = "filename",
ContentType = "image/" + extension
};
//byte[] img = System.IO.File.ReadAllBytes(imagepath);
var webClient = new WebClient();
byte[] img = webClient.DownloadData(imagePath);
media.SetValue(img);
args["source"] = media;
ret = fb.Post("v2.7/" + fbUserId + "/photos", args).ToString();//v2.1
Uri u = new Uri(imagePath);
string filename = string.Empty;
string extension = string.Empty;
extension = System.IO.Path.GetExtension(u.AbsolutePath).Replace(".", "");
var media = new FacebookMediaObject
{
FileName = "filename",
ContentType = "image/" + extension
};
var webClient = new WebClient();
byte[] img = webClient.DownloadData(imagePath);
media.SetValue(img);
args["source"] = media;
ret = fb.Post("v2.7/" + fbUserId + "/photos", args).ToString();
}
else
{
Uri u = new Uri(imagePath);
string filename = string.Empty;
string extension = string.Empty;
filename = imagePath.Substring(imagePath.IndexOf("get?id=") + 7);
if (!string.IsNullOrWhiteSpace(filename))
{
extension = filename.Substring(filename.IndexOf(".") + 1);
}
var media = new FacebookMediaObject
{
FileName = filename,
ContentType = "video/" + extension
};
//byte[] img = System.IO.File.ReadAllBytes(imagepath);
var webClient = new WebClient();
byte[] img = webClient.DownloadData(imagePath);
media.SetValue(img);
args["source"] = media;
ret = fb.Post("v2.7/" + fbUserId + "/videos", args).ToString();//v2.1
}
}
else
{
Expand Down Expand Up @@ -101,6 +124,8 @@ public static string ComposeMessage(Domain.Socioboard.Enum.FbProfileType profile
}




public static string FacebookComposeMessageRss(string message, string accessToken, string FbUserId, string title, string link, string rssFeedId, Helper.AppSettings _appSettings)
{
string ret = "";
Expand Down
46 changes: 43 additions & 3 deletions src/Api.Socioboard/Helper/TwitterHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using MongoDB.Bson;
using Socioboard.Twitter.Twitter.Core.UserMethods;


namespace Api.Socioboard.Helper
{
public static class TwitterHelper
Expand All @@ -34,16 +35,24 @@ public static string PostTwitterMessage(AppSettings _AppSettings, Cache _redisCa
OAuthTwt.AccessTokenSecret = objTwitterAccount.oAuthSecret;
OAuthTwt.TwitterScreenName = objTwitterAccount.twitterScreenName;
OAuthTwt.TwitterUserId = objTwitterAccount.twitterUserId;

Tweet twt = new Tweet();
if (!string.IsNullOrEmpty(url))
{
try
{
PhotoUpload ph = new PhotoUpload();
string res = string.Empty;
//rt = ph.Tweet(url, message, OAuthTwt);
rt = ph.NewTweet(url, message, OAuthTwt, ref res);
// rt = ph.Tweet(url, message, OAuthTwt);
if (url.Contains("mp4"))
{
var webClient = new WebClient();
byte[] img = webClient.DownloadData(url);
rt = videoUploading(img,message,objTwitterAccount.oAuthToken,objTwitterAccount.oAuthSecret,_AppSettings);
}
else
{
rt = ph.NewTweet(url, message, OAuthTwt, ref res);
}
}
catch (Exception ex)
{
Expand Down Expand Up @@ -91,6 +100,37 @@ public static string PostTwitterMessage(AppSettings _AppSettings, Cache _redisCa
return str;
}

public static bool videoUploading(byte[] binary,string tweetmessage,string accesstoken,string tokensecret,Helper.AppSettings _appsetting)
{
try
{
Tweetinvi.Auth.SetUserCredentials(_appsetting.twitterConsumerKey,_appsetting.twitterConsumerScreatKey,accesstoken, tokensecret);
string mediaType = "video/mp4";
var uploader = Tweetinvi.Upload.CreateChunkedUploader();
var half = (binary.Length / 2);
var first = binary.Take(half).ToArray();
var second = binary.Skip(half).ToArray();
if (uploader.Init(mediaType, binary.Length))
{
if (uploader.Append(first, "media"))
{
if (uploader.Append(second, "media"))
{
var media = uploader.Complete();
var tweet =Tweetinvi.Tweet.PublishTweet(tweetmessage, new Tweetinvi.Parameters.PublishTweetOptionalParameters
{
Medias = { media }
});
}
}
}
return true;
}
catch (Exception ex)
{
return false;
}
}
public static List<Domain.Socioboard.ViewModels.DiscoveryViewModal> DiscoverySearchTwitter(oAuthTwitter oauth, string keyword, long userId, long groupId)
{

Expand Down
Loading

0 comments on commit 0ed035e

Please sign in to comment.