【问题标题】:Get instagram photoes by tag wpf通过标签 wpf 获取 Instagram 照片
【发布时间】:2018-07-27 10:53:58
【问题描述】:

我正在使用 Instagram API,但我发现它已为开发人员屏蔽了 public_content。我必须通过我的应用程序注册,但他们要求我提供我网站的 url...,但我正在创建桌面应用程序!也许您知道使用此 API 的其他方式?我的应用程序的用户可以通过AOuth,但我找不到这样做的方法。我也尝试使用 InstaSharp,但没有帮助。

var clientID = "myid";
var clientSecret = "secret";

InstaSharp.InstagramConfig config = new 
InstaSharp.InstagramConfig(clientID, clientSecret);
OAuthResponse responses = new OAuthResponse();
var tags = new InstaSharp.Endpoints.Tags(config, responses);
var result = await tags.Recent("inst");
foreach (InstaSharp.Models.Media item in result.Data)
{
    MessageBox.Show(item.Link);
}

【问题讨论】:

    标签: c# instagram-api


    【解决方案1】:

    Instagram 提供了一个公共搜索选项,可能能够获得您想要的内容。我使用 Chrome 和开发者控制台以及网络活动选项卡来破译正确的查询参数。

    https://www.instagram.com/web/search/topsearch?context=user&q={username}
    

    这将返回一个 JSON 结果。如果您熟悉 JSON,这应该很容易搜索。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多