mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
Added Tumblr support, Twitter opens in browser if there is no valid Twitter account
This commit is contained in:
parent
f6f945f918
commit
6cea1d2624
2 changed files with 13 additions and 5 deletions
|
@ -1025,14 +1025,17 @@ public void ShareURL(string url)
|
|||
case URLSharingServices.Twitter:
|
||||
OAuthInfo twitterOAuth = Program.UploadersConfig.TwitterOAuthInfoList.ReturnIfValidIndex(Program.UploadersConfig.TwitterSelectedAccount);
|
||||
|
||||
if (twitterOAuth != null)
|
||||
if (twitterOAuth != null && OAuthInfo.CheckOAuth(twitterOAuth))
|
||||
{
|
||||
using (TwitterTweetForm twitter = new TwitterTweetForm(twitterOAuth, " " + url))
|
||||
{
|
||||
twitter.ShowDialog();
|
||||
}
|
||||
}
|
||||
//URLHelpers.OpenURL("https://twitter.com/intent/tweet?text=" + encodedUrl);
|
||||
else
|
||||
{
|
||||
URLHelpers.OpenURL("https://twitter.com/intent/tweet?text=" + encodedUrl);
|
||||
}
|
||||
break;
|
||||
case URLSharingServices.Facebook:
|
||||
URLHelpers.OpenURL("https://www.facebook.com/sharer/sharer.php?u=" + encodedUrl);
|
||||
|
@ -1040,15 +1043,18 @@ public void ShareURL(string url)
|
|||
case URLSharingServices.GooglePlus:
|
||||
URLHelpers.OpenURL("https://plus.google.com/share?url=" + encodedUrl);
|
||||
break;
|
||||
case URLSharingServices.VK:
|
||||
URLHelpers.OpenURL("http://vk.com/share.php?url=" + encodedUrl);
|
||||
break;
|
||||
case URLSharingServices.Reddit:
|
||||
URLHelpers.OpenURL("http://www.reddit.com/submit?url=" + encodedUrl);
|
||||
break;
|
||||
case URLSharingServices.Pinterest:
|
||||
URLHelpers.OpenURL(string.Format("http://pinterest.com/pin/create/button/?url={0}&media={0}", encodedUrl));
|
||||
break;
|
||||
case URLSharingServices.Tumblr:
|
||||
URLHelpers.OpenURL("https://www.tumblr.com/share?v=3&u=" + url);
|
||||
break;
|
||||
case URLSharingServices.VK:
|
||||
URLHelpers.OpenURL("http://vk.com/share.php?url=" + url);
|
||||
break;
|
||||
case URLSharingServices.Delicious:
|
||||
URLHelpers.OpenURL("https://delicious.com/save?v=5&noui&jump=close&url=" + encodedUrl);
|
||||
break;
|
||||
|
|
|
@ -154,6 +154,8 @@ public enum URLSharingServices
|
|||
Reddit,
|
||||
[Description("Pinterest")]
|
||||
Pinterest,
|
||||
[Description("Tumblr")]
|
||||
Tumblr,
|
||||
[Description("VK")]
|
||||
VK,
|
||||
[Description("Delicious")]
|
||||
|
|
Loading…
Reference in a new issue