Nerixyz / instagram_mqtt

Realtime and Push Notification (FBNS) support for the instagram-private-api
MIT License
252 stars 50 forks source link

Live Realtime Comments #104

Open kkm opened 1 year ago

kkm commented 1 year ago

Hello @Nerixyz

await ig.realtime.graphQlSubscribe(GraphQLSubscriptions.getLiveRealtimeCommentsSubscription('<broadcast-id>'));

with add listener

  ig.realtime.on('liveRealtimeComments ', logEvent('liveRealtimeComments'));

https://github.com/Nerixyz/instagram_mqtt/blob/master/examples/realtime.example.ts#L92

there was never an event and login works perfectly.

Nerixyz commented 1 year ago

with add listener

  ig.realtime.on('liveRealtimeComments ', logEvent('liveRealtimeComments'));

If that's your code, then you need to remove the space in the string: ig.realtime.on('liveRealtimeComments', logEvent('liveRealtimeComments'));. Otherwise, I can't really help since I haven't used it in a long time.

kkm commented 1 year ago

I changed it and the event never came, do you have idea?

  await ig.realtime.connect({
    graphQlSubs: [
      // these are some subscriptions
      GraphQLSubscriptions.getAppPresenceSubscription(),
      GraphQLSubscriptions.getZeroProvisionSubscription(ig.state.phoneId),
      GraphQLSubscriptions.getDirectStatusSubscription(),
      GraphQLSubscriptions.getDirectTypingSubscription(ig.state.cookieUserId),
      GraphQLSubscriptions.getAsyncAdSubscription(ig.state.cookieUserId),
    ],
    skywalkerSubs: [
      SkywalkerSubscriptions.directSub(ig.state.cookieUserId),
      SkywalkerSubscriptions.liveSub(ig.state.cookieUserId),
    ]
  });

Did I miss option something?

kkm commented 1 year ago

image debug shows it's connecting and it never came out when I write in the live events chat

Nerixyz commented 1 year ago

Maybe the id changed, as I said I haven't looked at it in a long time.

kkm commented 1 year ago

Maybe the id changed, as I said I haven't looked at it in a long time.

Kein Problem :), Ithink I want to understand with frida, will try next years and maybe you can change for repository. Did you work with Android Emulator or Smartphone and frida debug?

Nerixyz commented 1 year ago

Did you work with Android Emulator or Smartphone and frida debug?

I used an emulator.

kkm commented 1 year ago

I used an emulator.

Thanks and which emulator? Nox or Bluestacks or original from Android Studio? And install directly Google Playstore or Instagram.apk separately?

Nerixyz commented 1 year ago

Thanks and which emulator? Nox or Bluestacks or original from Android Studio?

I used Genymotion, though I suppose it doesn't really matter as long as you can be root.

And install directly Google Playstore or Instagram.apk separately?

It should be installed separately.

kkm commented 1 year ago

image I can't read, but it connects well with frida-server (16.0.8). Maybe your code is out of date?

https://github.com/Nerixyz/instagram_mqtt/blob/master/frida/mqttListen.js#L25 How can I also find with new version?

I took the Instagram version exactly as v123.0.0.21.114

kkm commented 1 year ago

@Nerixyz I'm not sure it needs to be patched with libger.so, right?

Nerixyz commented 1 year ago

I'm not sure it needs to be patched with libger.so, right?

That library is the http implementation for Instagram. The last time I checked, it doesn't have anything to do with mqtt.

kkm commented 1 year ago

@Nerixyz Danke, MQTT will no longer support it in the future?

Nerixyz commented 1 year ago

MQTT will no longer support it in the future?

MQTT is probably still used, but it's implemented in Java - not in a native library. You should be able to find references to it by searching for known strings in the apk file (e.g. ig/live_notification_subscribe).