plugins icon indicating copy to clipboard operation
plugins copied to clipboard

[Deploy] Instagram

Open reikolydia opened this issue 6 years ago • 7 comments

Service

Instagram : https://www.instagram.com/

Link to your repository

https://github.com/nnk95/franz-instagram

Additional Information

No DMs are available for the web service of Instagram yet, lets hope Instagram adds web support soon..

reikolydia avatar Oct 09 '19 17:10 reikolydia

@nnk95 : a trick to use Instagram DM web: simulate a mobile device in Chrome

https://developers.google.com/web/tools/chrome-devtools/device-mode

I think they keep this tool hidden to force people to download the app, and so get more notifications and use more the app.

I would like to use Instagram DM in Franz too.

up

ZackStone avatar Nov 12 '19 01:11 ZackStone

If you wanna try the Instagram private API: https://github.com/mgp25/Instagram-API

ZackStone avatar Nov 12 '19 01:11 ZackStone

@YitzhakAndrade : You gave me a good idea on the device mode setting. I have updated the code to enable DMs in Franz.

Still figuring out how to refresh the page elegantly without going into View > Reload Service.

And the weird issue of the stories going full screen when viewing them tho...

reikolydia avatar Nov 12 '19 06:11 reikolydia

You can actually connect your Instagram Business Account with your Facebook Page now and that integrates Direct Messages into the Inbox of Facebook Pages!

1001Tracklists avatar Dec 03 '19 18:12 1001Tracklists

Hi,

great, thanks for this!

One thing which would be nice to have is when hitting enter, the send button gets clicked. I somehow managed to but this piece of code together, which does that, but I don't know how to make it work inside webview.js? (it does work when I run it in chrome's dev tools while simulating a mobile device)

var input = document.querySelector('#react-root > section > div.IEL5I > div > div > div.Igw0E.IwRSH.eGOV_._4EzTm > div > div > div > textarea');
input.addEventListener("keyup", function (event) {
	if (event.keyCode === 13) {
		event.preventDefault();
		document.querySelector('#react-root > section > div.IEL5I > div > div > div.Igw0E.IwRSH.eGOV_._4EzTm > div > div > div.Igw0E.IwRSH.eGOV_._4EzTm.JI_ht > button').click();
	}
});

Maybe you could have a look at this, @nnk95 ?

edit: as a workaround one could also press tab and then enter. tab selects the send button, so [tab] + [enter] = send

nelsoncarr avatar Dec 11 '19 21:12 nelsoncarr

One thing which would be nice to have is when hitting enter, the send button gets clicked. I somehow managed to but this piece of code together, which does that, but I don't know how to make it work inside webview.js? (it does work when I run it in chrome's dev tools while simulating a mobile device)

edit: as a workaround one could also press tab and then enter. tab selects the send button, so [tab] + [enter] = send

Hi @nelsoncarr It would seem that the latest Instagram apps on multiple platforms seem to be breaking a new line on enter instead of sending the message directly. Might be a keyboard layout issue? I will investigate further.. So sorry for the late reply though.

Edited

reikolydia avatar Dec 29 '19 19:12 reikolydia

@nnk95 I made a DM recipe but I'm happy to have the code merged if you'd like (also I dealt with the Enter/newline issue), sorry I didn't see your deploy request before. See here: https://github.com/meetfranz/plugins/issues/453#issuecomment-574530897

zeyus avatar Jan 15 '20 07:01 zeyus

@zeyus We can use your code instead: zeyus instagram plugin

reikolydia avatar Jan 15 '20 08:01 reikolydia