标签: instasharp

InstaSharp API - 从特定标签获取数据

我正在使用InstaSharp API将我的Instagram中的图片加载到我的网站中.

现在我试图获取包含特定主题标签的所有数据,但我唯一得到的是一个随机对象(图片数据)添加到我的列表(result.Data).并且它总是相同的图片(该对象位于特定主题标签的整个对象列表中间的某个位置,而我在Instagram上搜索它时使用的这个标签会被点击66次,所以有超过1个).

如何从这个特定的标签中获取所有数据,以便我可以使用所有这些对象?

这是我的代码:

var users = new InstaSharp.Endpoints.Tags.Authenticated(Config, UserAuthInfo());

//- EDIT - reading the instagram-developer-api, I think this code will order the objects by when 
//they are hashtagged. This is not what I want, so the best thig would be to do it something like my last example
//result.Data only gets filled with one of these 66 objects
var result = users.Recent("mySpecificHashTag");

foreach (var item in result.Data)
{
    page.InstagramPhotos.Add( new InstagramPhoto()
    {
        Url = item.Images.StandardResolution.Url
    }); …
Run Code Online (Sandbox Code Playgroud)

c# instasharp

6
推荐指数
0
解决办法
1805
查看次数

无法使用 InstagramAPISharp UploadPhotoAsync() 方法将照片上传到 Instagram

我正在尝试将照片从我的电脑上传到我的 Instagram 页面,但它一直给我一个“ProcessingFailedError”。

这是我用来尝试上传的所有代码。它本来就是一个小程序。这是 API 的 Github: https: //github.com/ramtinak/InstagramApiSharp

using InstagramApiSharp;
using InstagramApiSharp.API;
using InstagramApiSharp.Classes;
using InstagramApiSharp.API.Builder;
using InstagramApiSharp.Logger;
using InstagramApiSharp.Classes.Models;

namespace HH_to_Insta
{
    class Program
    {
        public static UserSessionData userSession = new UserSessionData
        {
            UserName = "USERNAME",
            Password = "PASSWORD"
        };
        public static IInstaApi api = InstaApiBuilder.CreateBuilder()
                                        .SetUser(userSession)
                                        .UseLogger(new DebugLogger(LogLevel.All))
                                        .Build();

        static void Main(string[] args)
        {
            if (!Login().Result)
            {
                return;
            }

            var mediaImage = new InstaImageUpload
            {
                // leave zero, if you don't know how height and width is …
Run Code Online (Sandbox Code Playgroud)

c# instagram instasharp instagram-api

1
推荐指数
1
解决办法
1579
查看次数

标签 统计

c# ×2

instasharp ×2

instagram ×1

instagram-api ×1