-
Notifications
You must be signed in to change notification settings - Fork 241
Business account
Ramtin Jokar edited this page Dec 16, 2018
·
4 revisions
InstagramApiSharp supports Business accounts.
You can find all business functions in IInstaApi.BusinessProcessor class.
var businessAccountInformation = await InstaApi.BusinessProcessor
.GetBusinessAccountInformationAsync();
var statistics = await InstaApi.BusinessProcessor.GetStatisticsAsync();
var promotableMedias = await InstaApi.BusinessProcessor.GetPromotableMediaFeedsAsync();
var insights = await InstaApi.BusinessProcessor.GetMediaInsightsAsync("MEDIA PK");
Note: You should pass InstaMedia.Pk
to above function!!!!
var fullInsights = await InstaApi.BusinessProcessor.GetFullMediaInsightsAsync("MEDIA ID");
Note: You should pass InstaMedia.InstaIdentifier
to above function!!!
var starThread = await InstaApi.BusinessProcessor.StarDirectThreadAsync("THREAD ID");
var unstarThread = await InstaApi.BusinessProcessor.UnStarDirectThreadAsync("THREAD ID");
var partnersButton = await InstaApi.BusinessProcessor.GetBusinessPartnersButtonsAsync();
var desirePartner = partnersButton.Value.Find(p => p.PartnerName == "Yelp");
var uri = new Uri("https://www.yelp.com/search?find_desc=iran");
var addOrChangeButton = await InstaApi.BusinessProcessor
.AddOrChangeBusinessButtonAsync(desirePartner, uri);
var validateUrl = await InstaApi.BusinessProcessor.ValidateUrlAsync(desirePartner, uri);
var removeButton = await InstaApi.BusinessProcessor.RemoveBusinessButtonAsync();
var sugesstedCategories = await InstaApi.BusinessProcessor.GetSuggestedCategoriesAsync();
var categories = await InstaApi.BusinessProcessor.GetCategoriesAsync();
var categories = await InstaApi.BusinessProcessor.GetCategoriesAsync();
var firstCategory = categories.Value.FirstOrDefault();
var subCategories = await InstaApi.BusinessProcessor
.GetSubCategoriesAsync(firstCategory.CategoryId);
var firstSubCategory = subCategories.Value.FirstOrDefault();
var setOrChangeSubCategory = await InstaApi.BusinessProcessor
.ChangeBusinessCategoryAsync(firstSubCategory.CategoryId);
var cityLocation = await InstaApi.BusinessProcessor.SearchCityLocationAsync("Kazerun");
var myLocation = cityLocation.Value.FirstOrDefault();
var phoneWithCountryCode = "";
var contactMethodType = InstagramApiSharp.Enums.InstaBusinessContactType.Call;
var streetAddress = "";
var zipCode = "";
var updateBusinessInfo = await InstaApi.BusinessProcessor
.UpdateBusinessInfoAsync(phoneWithCountryCode, myLocation,
streetAddress,zipCode, contactMethodType);
Note 1: set null for phoneNumber, if don't want to change that!
Note 2: set null for location, if want to change that!
Note 3: set null for contactMethodType, if you don't want to change that.
var removeLocation = await InstaApi.BusinessProcessor.RemoveBusinessLocationAsync();
Iranian Developers (c) 2021 | Bahar 1400