简体   繁体   中英

Website link that opens Instagram Direct Message with the specified href as the body text?

Basically I'm looking for Instagram's equivalent of:

whatsapp://send?text=myspecifiedurlgoeshere.com

I can't find anything online about this. I had no problem doing this with facebook, facebook messenger, twitter, whatsapp, and email

There is no foolproof Instagram API for direct messages in my knowledge, let alone url param based support. And I guess there won't be any since it has been a long time.

However, you can try using the instagram-private-api to send direct messages via:

const userId = await ig.user.getIdByUsername('username');
const thread = ig.entity.directThread([userId.toString()]);
await thread.broadcastText('Message from node');

(Source: https://github.com/dilame/instagram-private-api/issues/792 )

For other software based integrations - https://maytapi.medium.com/instagram-dm-api-documentation-start-to-use-instagram-dm-api-with-4-s-84d147d7d361

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM