private static readonly
Lazy<Ramtin> LazyRamtinIsHere =
new(() => new());
ramtinak / instapost Goto Github PK
View Code? Open in Web Editor NEWUpload videos, images or album to Instagram site
Upload videos, images or album to Instagram site
private static readonly
Lazy<Ramtin> LazyRamtinIsHere =
new(() => new());
Challange required info is empty
try to call LoginAsync first.
But i already call ?
My Code;
`using CoreLib.Helpers;
using InstagramApiSharp.API.Builder;
using InstagramApiSharp.Classes;
using InstagramApiSharp.Logger;
using InstagramApiSharp.API;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Text.RegularExpressions;
namespace ISharp
{
public partial class Form1 : Form
{
public static IInstaApi api { get; set; }
public Form1()
{
InitializeComponent();
grp_Doğrulama.Visible = false;
textBox1.Enabled = false;
button1.Enabled = false;
}
public async void button1_Click(object sender, EventArgs e)
{
Form1 f1 = Application.OpenForms["Form1"] as Form1;
var user = new UserSessionData
{
UserName = txt_Kadi.Text,
Password = txt_Sifre.Text
};
api = InstaApiBuilder.CreateBuilder()
.SetUser(user)
.UseLogger(new DebugLogger(LogLevel.Exceptions))
.Build();
var giris = await api.LoginAsync();
if (giris.Succeeded)
{
var mevcutuser = await api.GetCurrentUserAsync();
isimdegistir(mevcutuser.Value.UserName);
}
else
switch (giris.Value)
{
case InstaLoginResult.InvalidUser:
MessageBox.Show("Yanlış kullanıcı adı");
break;
case InstaLoginResult.BadPassword:
MessageBox.Show("Yanlış Şifre");
break;
case InstaLoginResult.Exception:
MessageBox.Show("Exception throws:\n" + giris.Info?.Message);
break;
case InstaLoginResult.LimitError:
MessageBox.Show("Limit Hatası(Tekrar denemeden önce 10 dakika bekleyiniz..)");
break;
case InstaLoginResult.ChallengeRequired:
grp_Doğrulama.Visible = true;
break;
case InstaLoginResult.TwoFactorRequired:
f1.grp_Doğrulama.Visible = true;
break;
}
}
public void isimdegistir(string isim)
{
Form1 f1 = Application.OpenForms["Form1"] as Form1;
f1.Text = "ISharper - " + isim;
}
private async void radio_Telefon_CheckedChanged(object sender, EventArgs e)
{
radio_Telefon.Enabled = false;
radio_Mail.Enabled = false;
var telefon = await api.RequestVerifyCodeToSMSForChallengeRequireAsync();
if (telefon.Succeeded)
{
MessageBox.Show("Sms kutnuzu kontrol ediniz..");
}
else
{
MessageBox.Show(telefon.Info.Message);
}
}
private async void radio_Mail_CheckedChanged(object sender, EventArgs e)
{
radio_Telefon.Enabled = false;
radio_Mail.Enabled = false;
var email = await api.RequestVerifyCodeToEmailForChallengeRequireAsync();
if (email.Succeeded)
{
MessageBox.Show("Mail kutunuzu kontrol ediniz..");
}
else
MessageBox.Show(email.Info.Message);
}
private async void btn_KodGonder_Click(object sender, EventArgs e)
{
txt_Kod.Text.Replace(" ", "");
var regex = new Regex(@"^-*[0-9,\.]+$");
if (!regex.IsMatch(txt_Kod.Text))
{
MessageBox.Show("Doğrulama kodu sayı olmalıdır!!!");
return;
}
if (txt_Kod.Text.Length != 6)
{
MessageBox.Show("Doğrulama kodu 6 haneli bir sayı olmalıdır!!!");
return;
}
var dogrulama = await api.VerifyCodeForChallengeRequireAsync(txt_Kod.Text);
if (dogrulama.Succeeded)
{
isimdegistir("ISharp - Doğrulama başarılı");
}
else
{
if (dogrulama.Value == InstaLoginResult.TwoFactorRequired)
{
MessageBox.Show("İki faktörlü doğrulama gerekiyor.");
button1.Enabled = true;
textBox1.Enabled = true;
}
}
}
private async void button1_Click_1(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(textBox1.Text))
{
MessageBox.Show("Lütfen 2 faktörlü doğrulama kodunu yazın ve gönderin.");
return;
}
try
{
var ikifaktor = await api.TwoFactorLoginAsync(textBox1.Text);
if (ikifaktor.Succeeded)
{
isimdegistir("ISharp - Giriş Başarılı");
}
else
{
MessageBox.Show(ikifaktor.Info.Message);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
}
`
System.ComponentModel.Win32Exception
HResult=0x80004005
İleti=Sistem belirtilen dosyayı bulamıyor
Kaynak=System
StackTrace:
konum System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
konum System.Diagnostics.Process.Start()
konum FFmpegFa.FFmpeg.ExtractImageFromVideo(String inputFile, String outputFile)
konum InstaPost.Views.PostView.d__2.MoveNext() C:\Users\cs\Desktop\InstaPost-master\InstaPost\Views\PostView.xaml.cs içinde: 66. satır
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.