0
votes

I am developing an iOS Facebook Chat client app using XMPP (I am using the XMPPFramework by Robbie Hanson). One of my requirements is my App would want to know if the online users in my roster are using the same App. (So the use case is to provide some extra features when two users are using the same App to communicate).

I am thinking to add my app name in the resource part of the JID (e.g. <...>@chat.facebook.com/myApp) such that my App can use it to identify itself by examining the JIDs of the online users. However, I can't find any way to do it when I look at the JIDs received, they are just <...>@chat.facebook.com.

So does anyone know if it's possible to set the resource for Facebook Chat or if there is another way to achieve what I want?

Thanks a lot.

Billy

1

1 Answers

1
votes

Using the resource for this is not a good idea. There are lots of services that take control over the resource. As well, you'll find that you're going to write another client one day that has a different name, and only implements some of the features that you're expecting from your one client.

First, read XEP-0115 several times. Most people who read it the first time get confused, so please be patient until it clicks in.

Next, describe each one of the individual features of your client with a separate URI. Use those feature URIs in your capabilities hash. If you MUST check for the actual identity of the client, use the caps node URI to match on.