×
Namespaces

Variants
Actions

Talk:Facebook Chat Client for Windows Phone

From Nokia Developer Wiki
Jump to: navigation, search

Contents

Arslan-Pervaiz - Some Early Feedback And Suggestions

Hi Somnath,

First of all thanks alot for such a wonderful work done by you in this XMPP library. Its really highly appreciated.

I have some suggestion lists that you can do as per your convenient. 1. As We know all chat clients mostly follow XMPP protocol that is standard. Facebook, Yahoo, MSN, Skype work on XMPP based implementation. Then why not you make this library as generic that can support all social network that supports the XMPP standards.

2. I havent tested yet this library but as per this wiki post and as per my initial understanding you are getting friends online status on start of app once in this even "OnLoadedOnlineFriends : Returns list of online friends" and then friends online status might be not refreshed in later time. Why not you are handling proper "Presence" of user that is basic feature of XMPP that returns you notification message in incoming stanza that user has gone offline or online. I think that will be potential feature of any chat client or library.

3. As this lib is mainly focusing on Facebook and facebook doesnot allow to addSubscription("Add To Buddy List") and delete subscription("Remove From Buddy List") but if you think to make this lib generic then that will also be potential feature of this library.

And Again Keep Rocking With Such Wonderful work and share your knowledge like this. I wish you must try to do some above suggested improvements as there is no such XMPP library available for Windows Phone and you will be the pioneer one to introduce this thing on this platform. That will help other too much.

I will do the test and will share more feedback on this with my results.

Regards,

Arslan Pervaiz

Arslan-Pervaiz (talk) 20:53, 19 September 2013 (EEST)

Somnathbanik - Thanks

Hi Pervaiz,

Thanks for all your feedback. I will definitely try your points to add in the library. Regarding your point 2 its actually the "Presence". The event "OnLoadedOnlineFriends" gets called when there is any change in any of the user presence and display the list of online friends only. If any user goes offline this event gets called immediately and update the presence list. To be more specific I am filtering the presence and taking only the online presence to a list class.

Try out the library and let me know if you need any changes in this even. We will surely update accordingly.

Regards

Somnath

somnathbanik (talk) 22:38, 19 September 2013 (EEST)

Somnathbanik - OnLoadedOnlineFriends

OnLoadedOnlineFriends gets called when ever there is a change in user presence. The only difference is that it will return you the list of online friends only, if any friends goes offline or online the list gets updated. Like the one we see in default Windows Phone Facebook Chat list, where only online friends are displayed.

somnathbanik (talk) 22:59, 19 September 2013 (EEST)

Arslan-Pervaiz - Enhancement OnLoadedOnlineFriends

Hi Somnath,

Thanks for your positive feedback that is much appreciated. I Would love to suggest if you can return all buddy list in this event "OnLoadedOnlineFriends" with status offline and online and all other info of user. Reason is that is default mechanism. Now its Dev responsibility if he wants to show just online then he/she can filter from that list and display or either want to show offline aswell. In context of this facebook app, I would love to have all contacts in my list with offline and online category or what ever the app requirement. Offline contact is needed because you can send message as well on facebook when user is offline. So that will be potential change. And will increase its usability more even by having online and offline contacts messaging.

Arslan-Pervaiz (talk) 09:49, 20 September 2013 (EEST)

Arslan-Pervaiz - Imporvements Suggestions

Hi Somnath,

I hope you are doing good. I got a chance to explore your XMPP library. Thats really nice. I got some questions and some suggestions aswell.

1. I noticed that you have created 4 separate dll's to make this library I am curious to know that if its XMPP implementation then why not in single dll instead of dependency of four different dll's to implement XMPP. I guess it will be better if everything resides in standalone dll instead chunks of dll. Again its my point of view, You can surely differ from that.

2. Second Thing I have noticed that, You are returning list on this event "OnLoadedOnlineFriends" And the item type is FriendStatusItem. This class is not implementing iNotifypropertyChanged interface. If you implement that it will be good in binding and any change will be notified to UI seamlessly or Instead of Simple List If You Return Observable Collection.

I Will Keep Posting Things On Thats. I Hope You Wont Mind With That. :)

Keep Rocking With Good Work.

Arslan-Pervaiz (talk) 20:11, 22 September 2013 (EEST)

Somnathbanik - Love your suggestions

Hi Pervaiz,

Give me few days. I will add your suggestions and will update the library by end of this week. And thanks for your interest, please keep posting your feedback.

Regards

Somnath

somnathbanik (talk) 08:10, 23 September 2013 (EEST)

Somnathbanik - New Release

Hi Pervaiz,

Please check the new release. Some of your points has been taken care of.


Regards

Somnath

somnathbanik (talk) 16:46, 4 October 2013 (EEST)

Hamishwillee - Very cool, but needs some clarification

Hi Somnath

OK, so I'm impressed :-) Great initiative to address the needs of the community and go do this.

The weakness in this article is the introduction. What I think you've done is:

  • created a "Facebook Chat clients libary" that implements the Jabber/XMPP service" - correct?
  • you've named this FacebookChat Library, and its in a namespace XFacebook, with class name static IXFacebook iXFacebook. Correct? (note, I think "static IXFacebook iXFacebook" might then be a typo?
  • This library can be used to chat, but you first need to authenticate. The article shows how to authenticate and use the library. Correct?

The problem is that its not clear where this library comes from in the introduction, so the article sounds like its about authentication, when it is also about using the library, or at least that is what I think. If you can confirm that in a comment I can tidy this up quite easily.

I would probably follow the introduction with the explanation of the what the library offers (ie the API reference you added). I would also add information about licensing of the library (ideally BSD or MIT) - even better, host on github and make this clear there.

Otherwise, as I say, excellent.

Regards Hamish

PS Sorry it took me a while to get to this. A week off followed by a week catchup :-0

hamishwillee (talk) 09:12, 7 October 2013 (EEST)

Somnathbanik - You got things right

Hi Hamish,

You are right!

  • This article is not focusing on Facebook Authentication rather implementing Facebook Chat client using the library which uses Jabber/XMPP service, so I just added two Facebook Authentication links in the article other than explaining the complete authentication process.
  • As this library supports X-FACEBOOK platform so I named it as XFacebook as its namespace.

Please share more feedback so that we can update the library with more features. And please feel free to make any change in the article you want :-)

Regards

Somnath

somnathbanik (talk) 10:32, 7 October 2013 (EEST)

Hamishwillee - Great/Subedited

Hi Somnath

Thanks. OK, I have subedited to restructure. Introduction now says what this actually delivers, and I've moved the authentication information down to its own section. Please check that this is still all accurate - ie does say what you meant it to say.

Now that's done, some "suggestions for improvement" - very minor!

  • Firstly, naming, you might want to rename things like "FacebokKey" to FacebookKey
  • Do you intend others to use this? If so, then the ND site terms and conditions are not very permissive. Are you OK to apply MIT or BSD licensing? If so, this can be done by stating the licening in a license.txt in your zip uploaded.
  • Great to host this on github then you would have proper ticketing system (or codeplex)

Anyway, let me know what you think.

Regards

H

hamishwillee (talk) 13:47, 7 October 2013 (EEST)

Somnathbanik - Thanks for edit

Hi Hamish,

  • I don't mind if others are interested to use this library and share feedback to improve it.
  • Regarding licensing; I want to make it free to use with what ever license fits on it.
  • What text should I write in license.txt file, as I have never done any licensing stuff before it would be nice if you could help me.
  • I am OK hosting the library on github or codeplex.


Regards

Somnath

somnathbanik (talk) 14:08, 7 October 2013 (EEST)

Arslan-Pervaiz - More Feedbacks

Hi Somnath,

I have look more deeper on this library. I found some more things. I have some more suggestions.

1. You are returning all the list when its populated fully so it will take bit time. So Better approach and practice is to send presence packet one by one So user add them in list when he got that.

2. You are fetching the User Image from Facebook separately instead of getting from vCard of user. So I would recommond you get Image From vCard Rather Than Extra WebHit For UserImage.

3. You Can Also Returns The vCard in Presence that is always with in it so we can get image of user to show on chat Page.

4. Then I will agree himish if you will disclose your source publicly under GPL, BSD then any one can user as per requirement and can share patches and enhancement based on your library.

Happy Coding, Keep Rocking

Arslan-Pervaiz (talk) 20:37, 7 October 2013 (EEST)

Hamishwillee - Licencing

Hi Somnath

What you want is a permissive free license. The two licenses that most people point to are MIT and BSD. They have minor differences and I suggest you check the wikipedia pages because they explain the main differences. Mostly these are just minor extra terms about when the license.txt needs to be included/mentioned (ie with binaries and source, or just with source) and one of the BSD variants also explicity prohibits your name being used as part of the deriving app's promotion. Personally I like MIT.

To use you just copy the license you like into a text file, name it license.txt and put in the root of your zip file. In the article itself I'd make a comment that the article and associated code example is licenced under BSD.

Enough to go on with?

Regards H

Hope you do create a project - if you do, then I'd link to that from the article too. Remember to keep the license consistent in both places.

hamishwillee (talk) 04:49, 8 October 2013 (EEST)

Abhisinghal1087 - online friends not visible

i deployed this app to my lumia 720, i was able to log in into my account but the app isnt showing any online friend, once it showed a friend, i tapped his name, bt when the chat opened it was some other friend. what is going wrong?

abhisinghal1087 (talk) 14:55, 11 January 2014 (EET)

Somnathbanik - download version 1.1

Hi Abhi,

Please download the last version (version 1.1) of the library and replace it in your project. It should be all fine.

Regards

Somnath

somnathbanik (talk) 17:28, 11 January 2014 (EET)

Abhisinghal1087 - using the same

i am using version 1.1

abhisinghal1087 (talk) 22:46, 12 January 2014 (EET)

Chetankhatri - using OnLoadedOnlineFriends() method

Hi, Somnath First of all thank you for nice Library, I want to know two thing

1)how can we show only online friends using OnLoadedOnlineFriends() method? 2)If i want to display recent chat contact and last message only using panorama XAML page then which classes i have to use ?

Thank you!

chetankhatri (talk) 14:05, 9 March 2014 (EET)

Somnathbanik - OnLoadedOnlineFriends

Hi Chetan, Initially the event OnLoadedOnlineFriends used to return only online friends, but later we changed it and I think that is worth.(see comments). To get the only online friends just check the "Status" . In the iXFacebook_OnLoadedOnlineFriends method check FriendsStatusItemsArgs values, you will get the status. Suggest you to debug this code to see all possible values, and filter it.

Regarding your second question, the feature is not implemented in this library. If you can explain me in more detail about the feature probably I can try to implement in the new release of the library.

Regards

Somnath

somnathbanik (talk) 05:43, 14 March 2014 (EET)

Chetankhatri - OnLoadedOnlineFriends

Hi Somnath Sir,

Thank you for reply.

chetankhatri (talk) 10:16, 15 March 2014 (EET)

Karim.Zeitoun - OnLoadedOnlineFriends

Hi Somnath,

I have a question about this method "OnLoadedOnlineFriends" when is it called exactly ? because after logging to the facebook, the friends list is empty. I wrote the following line at the beginning of the OnLoadedOnlineFriends "Debug.WriteLine("Entered Method"); but this line was never executed.

It's not a problem of refreshing the List because the program didn't print out "Entered Method" . Is there a way please to call this method manually ? what shall I do to call it manually if at any point of the application I wanted to re get the list of online friends ?

Thanks alot for your great effort.

Karim.Zeitoun (talk) 15:15, 31 March 2014 (EEST)

Liwq - Get error and Cannot Connect.

Hi Somnath, I used the lib and just get these error message, i haven't the source and i can't get the reson. it just call OnLoadedUserStateChanged, and return “Unknown” state,could you help me,thank you very much.

in OnLoadedUserStateChanged:


Connecting An exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.ni.dll and wasn't handled before a managed/native boundary An exception of type 'System.Net.Sockets.SocketException' occurred in System.Net.ni.dll and wasn't handled before a managed/native boundary An exception of type 'System.Net.Sockets.SocketException' occurred in System.Net.ni.dll and wasn't handled before a managed/native boundary Unknown

my source code:


               XFacebook.Constants.Constants.FacebookAccessToken = session.AccessToken;
               XFacebook.Constants.Constants.FacebookAppKey = session.FacebookId;
               App.iXFacebook.OnLoadedOnlineFriends += (s1, e1) =>
               {
                   System.Diagnostics.Debug.WriteLine(e1);
               };
               App.iXFacebook.OnLoadedFriendList += (s1, e1) =>
               {
                   System.Diagnostics.Debug.WriteLine(e1);
               };
               App.iXFacebook.OnLoadedMessageReceived += (s1, e1) =>
               {
                   System.Diagnostics.Debug.WriteLine(e1);
               };
               App.iXFacebook.OnLoadedUserConnected += (s1, e1) =>
               {
                   System.Diagnostics.Debug.WriteLine(e1);
               };
               App.iXFacebook.OnLoadedUserConversationStateChanged += (s1, e1) =>
               {
                   System.Diagnostics.Debug.WriteLine(e1);
               };
               App.iXFacebook.OnLoadedUserDisconnected += (s1, e1) =>
               {
                   System.Diagnostics.Debug.WriteLine(e1);
               };
               App.iXFacebook.OnLoadedUserStateChanged += (s1, e1) =>
               {
                   System.Diagnostics.Debug.WriteLine(e1.iConnectionStateItems.Status);
               };
App.iXFacebook.Connect(XFacebook.Constants.Constants.FacebookAccessToken, XFacebook.Constants.Constants.FacebookAppKey);

liwq (talk) 07:00, 17 April 2014 (EEST)

Rescue Lumia - Urgent

The app successfully logs into my facebook account. But it doesn't show any online/offline friends. I have granted the xmpp_login ability in my facebook appcenter permissions. Please respond quickly.

thank you.

Rescue Lumia (talk) 12:53, 8 May 2014 (EEST)

Rescue Lumia - forgot to say

i have also replaced the new sdk files.

Rescue Lumia (talk) 12:54, 8 May 2014 (EEST)

 
×