ramtinak / InstagramApiSharp

A complete Private Instagram API for .NET (C#, VB.NET).
MIT License
780 stars 239 forks source link

share media to direct #554

Closed alirezak22 closed 4 months ago

alirezak22 commented 2 years ago

Issue category

Language

Usage

Operating System

Debug logs

If your issue has an debug log, post it here, unless remove this section!

Describe your issue

Hello and courtesy I have solved my project problems several times by your api and thank you for this before asking A new problem that I have encountered is that I want to send a post to the member direct, which I found by searching the API that I can use the following function

api.MessagingProcessor.ShareMediaToUserAsync();

I encounter this problem after referencing the function parameters and sending the request


Object reference not set to an instance of an object.


Capture


I would be grateful if you could guide me in the way to solve this problem Thanks

Screenshots

If you have screenshots, you can post it here. unless remove this section! Capture

ramtinak commented 2 years ago

Hey, Use InstaIdentifier property instead of using mediaPk.

Remember, most of places that needs an action to feeds, requires InstaIdentifier property.

Regards.

alirezak22 commented 1 year ago

If you can send me a similar piece of code, I will be gratefulπŸ™πŸ™πŸ™πŸ™πŸ™πŸ™πŸ™πŸ™

ramtinak commented 1 year ago

Check this out: https://github.com/NGame1/Winsta11/blob/9adfc4a3c84dbea2e35072ce5a76050fea1138f5/WinstaNext/ViewModels/Media/InstaMediaPresenterUCViewModel.cs#L278

if you don't know how to use a specific function, search it in Winsta11 repo, probably @NGame1 used it in his app. Some parameter might different because he is using latest private version.