Giter VIP home page Giter VIP logo

instapost's Introduction

زندگی هیچوقت به کام نیست...
private static readonly 
    Lazy<Ramtin> LazyRamtinIsHere =
        new(() => new());

instapost's People

Contributors

ramtinak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

instapost's Issues

video upload problem

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

I get an error

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);
        }
    }
}

}
`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.