使用InstagramApiSharp将照片直接发布到Instagram时遇到麻烦

问题描述 投票:1回答:1

我使用以下代码将照片直接发布到Instagram但是它给出了错误Challenge_required。您认为问题出在哪里?

        private async void btn_i_s_Click(object sender, EventArgs e)
        {
            var inbox = await ctx.api.MessagingProcessor.GetDirectInboxAsync(PaginationParameters.MaxPagesToLoad(1));
            var threadId = inbox.Value.Inbox.Threads.FirstOrDefault(i => i.Title == txt_u_p.Text).ThreadId;
            OpenFileDialog op = new OpenFileDialog();
            op.ShowDialog();
            var imageUp = new InstaImage()
            {
                Uri = op.FileName
            };
            var image = await ctx.api.MessagingProcessor.SendDirectPhotoAsync(imageUp, threadId);
            if (image.Succeeded)
            {
                MessageBox.Show("Sended ...");
            }
            else
            {
                MessageBox.Show(image.Info.Message);
            }
        }

enter image description here

c# .net api instagram sharp
1个回答
0
投票

可以提供帮助:Challenge Require

© www.soinside.com 2019 - 2024. All rights reserved.