I am building an app which uses Facebook login to fetch all friends. When I post an update, all my FB friends should get notified. How do I achieve this in PubNub APIs. I am looking at PNChannel
PNChannel *myChannel = [PNChannel channelWithName:myFBID shouldObservePresence:YES]; [PubNub subscribeOnChannel:myChannel]; [PubNub sendMessage:myMessage toChannel:myChannel];
So if I have 200 users for my App, I will have 200 channels in total. Is this the right way to solve it ? Or there is any better way. Thanks in advance.
At a high level, this is what you should do.
To make subscribing to all these channels manageable, you need to enable Stream Controller on your account and create channel groups as needed and add channels to those groups.
Hope this is enough to get you started and moving forward but let us know if you have any further questions (or accept this as the answer if you don't mind).