webOS Nation Forums >  webOS Developers >  webOS Development > Tutorial : How to get FaceBook Chat on WebOS 1.x, 2.x, 3.x
Tutorial : How to get FaceBook Chat on WebOS 1.x, 2.x, 3.x
  Reply
Like Tree11Likes

 
Thread Tools Display Modes
Old 12/30/2011, 11:51 AM   #1 (permalink)
Member
 
Posts: 62
Ok, great news everyone !
Got Facebook Chat to work perfectly on WebOS 2.2.4 AND 3.0.5 (should work on any 2.x and 3.x ) !
For 1.x I have no way to test it but it SHOULD work ! Can someone confirm it ?

/!\ I'm not responsible for any problem, loss of data, dead kitten or exposition to justin bieber that could occur if you follow this tutorial ! /!\
/!\ Although the risk seems minimum, You should save all your data before beginning ! /!\


What works :
- Contacts name
- Contacts picture
- Integration with other service (Synergy)
- Send and receive text

What doesn't :
- The "type" of the account is shown as "Google".
- Nothing else ^^

// Changelog for this tutorial//
Quote:
-> v1.3 (current) :
- Replaced instructions with scripts

-> v1.2 :
- Added WebOS 1.x

-> v1.1 :
- Added WebOS 3.x (TouchPad)
- Simplified instructions (no more vi)

-> v1.0 :
- First release


// Credits //
This method wouldn't work without this tutorial (ALL credits to Klaus Reimer) :
Generic Jabber (XMPP) with webOS - K's cluttered loft



// The problem (ONLY On 2.x and 3.x) //

A tutorial exist to connect to jabber, but it require to have a valid google account with the email you wan't to use in the chat.
But you can't create a dummy google account for login@chat.facebook.com, because it can't receive email.
So we are going to modify the file that check for the validity of the account.



// What you need //

For 1.x, 2.x and 3.x
-> A Facebook account (yeah i know, quite obvious), you also have to know your unique facebook name, the name that appear in your facebook profile url :
https://www.facebook.com/yourFacebookName
Should be a link to your profile

-> Some patience

ONLY For 1.x

-> The file "Pre 1x.zip" in the attachments of this thread


ONLY For 2.x and 3.x
-> A Google account (any name you want) with the SAME password as your facebook account. Let's call it : "yourGoogleAccount@gmail.com"

-> The file "Pre 2x Touchpad 3x.zip" in the attachments of this thread



// Let's do this ! //

// For 1.x //
-> 1 :
Extract the zip file and put the "fb" folder on your phone memory.

-> 2 :
Connect using novacom or run these command in a terminal :
Quote:
cd /media/internal/fb
chmod +x patch.sh
./patch.sh
-> 3 :
You are done you can add your account in the messaging app, select Google and put your infos :
username : yourFacebookName@chat.facebook.com
password : yourFacebookPassword


// For 2.x and 3.x //
-> 1 :
Extract the zip file and put the "fb" folder on your phone memory.

-> 2 :
Connect using novacom or run these command in a terminal :
Quote:
cd /media/internal/fb
chmod +x step1.sh
REPLACE with your real info then run :
NEVER RUN THIS TWICE IN A ROW ! If you misspelled or anything, RUN STEP 4 BEFORE RUNNING IT AGAIN ! This script assume that everything is UNMODIFIED !
-> 3 :
Wait for luna to restart then add your account in the messaging app, select Google and put your infos :
username : yourFacebookName@chat.facebook.com
password : yourFacebookPassword

Uncheck everything except for messenger.
You can also check Contacts, this way you will be able to link your friends in the FB chat with your friends phone number, skype and all. But if you already added FaceBook as an account for Contacts, it won't link automatically FB contacts and FB chat contacts.

-> 4 :
To cleanup and restore the ability to add google account, connect using novacom or run these command in a terminal :
Quote:
cd /media/internal/fb
chmod +x step2.sh
./step2.sh
-> 5 :
Version 2.x ONLY :
If you have a Google chat account already configured, you have to go in accounts, and disable it. Connect to the chat, disconnect, and reenable. (Otherwise you can't send message to your FB contacts due to a WebOS 2.x bug).


If you have any question regarding this tutorial, post them here !

Note on 3.0.5 touchpad update :
In case of an update, the account will no longer work, just follow tutorial again and instead of adding a new account, connect your old one .


I apologize for any English mistake i could have made in this tutorial, im French so English isn't not my native language :s
Attached Files
File Type: zip Pre 1x.zip (40.3 KB, 201 views) Email Attachment
File Type: zip Pre 2x Touchpad 3x.zip (40.6 KB, 458 views) Email Attachment
__________________
If you like what i do, and can spare a few bucks, you can always

Last edited by gnomesgames; 03/29/2012 at 03:03 PM.
gnomesgames is offline   Reply With Quote
Liked by smcbeaven, patrickc, sshaka and 6 others like this.
Old 12/30/2011, 12:18 PM   #2 (permalink)
Member
 
pchrist's Avatar
 
Posts: 420
Ok wanting to try this!!!!! Can't find terminal in preware. Can it be done with WebOSQuickInstall Is there a way to get it into a patch form???

Kind of a newby here when it comes to putting code in but when i have the tools it isn't hard.
pchrist is offline   Reply With Quote
Old 12/30/2011, 12:20 PM   #3 (permalink)
Member
 
Posts: 62
@pchrist :
You can connect using novacom :
Novacom on Windows - WebOS Internals

You can then run every command needed from your PC on your phone .

About the patch, i don't know how to do it, but we can imagine a patch to do, and a patch to undo the modification.. Still the part where you have to copy the certificates is mandatory so people would still need to connect using terminal..
gnomesgames is offline   Reply With Quote
Old 12/30/2011, 02:18 PM   #4 (permalink)
Member
 
Posts: 35
million dollar question; Does this support webOS 2.2.4?
olivercorb is offline   Reply With Quote
Old 12/30/2011, 02:19 PM   #5 (permalink)
Member
 
Posts: 62
Quote:
Originally Posted by corbey94 View Post
million dollar question; Does this support webOS 2.2.4?
Yes ! Done it on my european pre3, latest version (2.2.4) !
gnomesgames is offline   Reply With Quote
Old 12/30/2011, 03:21 PM   #6 (permalink)
Member
 
Posts: 62
I can't rename the thread Oo ? That's weird, most forum allows to do that.. Can an admin rename it for me as it's now both for touchpad and pre ?
gnomesgames is offline   Reply With Quote
Old 12/30/2011, 06:27 PM   #7 (permalink)
Member
 
Posts: 67
Hello,
does this work for webos 1.4.5?
studyhood is offline   Reply With Quote
Old 12/30/2011, 06:32 PM   #8 (permalink)
Member
 
Posts: 62
Quote:
Originally Posted by studyhood View Post
Hello,
does this work for webos 1.4.5?
Hello ! I dont know because i don't have any device on 1.4.5... But i think that if you just follow the tutorial of step 1 until the end, and just add your account like that :
Select google account in messaging
- username : yourFacebookName@chat.facebook.com
- password : yourFacebookPassword

That should work .
Please tell me if that did work so i can update the tutorial
__________________
If you like what i do, and can spare a few bucks, you can always
gnomesgames is offline   Reply With Quote
Old 12/31/2011, 07:08 AM   #9 (permalink)
Homebrew Developer
 
Posts: 697
Quote:
Originally Posted by gnomesgames View Post
I can't rename the thread Oo ? That's weird, most forum allows to do that.. Can an admin rename it for me as it's now both for touchpad and pre ?
You can press the "report post" button of the first post and request the new title, a moderator will do it for you.
__________________
Apps: Explorer for Dropbox a Dropbox app for webOS that actually works (TP+phones), 3-panel-interface
File Explorer fast and simple file manager (root support on webOS 3)
QuickChat for Facebook real-time Facebook chat
Archive Manager extract and create archives (zip, rar, 7z, )
FTPit! full-featured FTP client for webOS
Twitter: @pcworldSoftware; e-mail (contact, support, buy apps via PayPal) if you like what I'm doing, feel free to (alternatively in USD)
pcworld is offline   Reply With Quote
Thanked By: gnomesgames
Old 12/31/2011, 10:05 AM   #10 (permalink)
Member
 
Posts: 2,586
I don't need this, but as always: I like tutorials like this. Thanks,
__________________
Dr. Battery
somline is offline   Reply With Quote
Thanked By: gnomesgames
Old 12/31/2011, 10:14 AM   #11 (permalink)
Member
 
Posts: 36
how do I get this ~ and this | character in terminal in my palm pre
ghostjb is offline   Reply With Quote
Old 12/31/2011, 10:18 AM   #12 (permalink)
Member
 
Posts: 62
Quote:
Originally Posted by ghostjb View Post
how do I get this ~ and this | character in terminal in my palm pre
I don't know :s.. But you can use novaterm to connect to your phone and run all the command needed .
Just follow this if you are on windows :
Novacom on Windows - WebOS Internals
__________________
If you like what i do, and can spare a few bucks, you can always
gnomesgames is offline   Reply With Quote
Old 12/31/2011, 10:48 AM   #13 (permalink)
Homebrew Developer
 
Posts: 697
Btw, on webOS 1.4.5 there was/is a patch for Facebook chat which just redirected talk.google.com to the IP of chat.facebook.com (via /etc/hosts), that may be easier than modifying binary files.
__________________
Apps: Explorer for Dropbox a Dropbox app for webOS that actually works (TP+phones), 3-panel-interface
File Explorer fast and simple file manager (root support on webOS 3)
QuickChat for Facebook real-time Facebook chat
Archive Manager extract and create archives (zip, rar, 7z, )
FTPit! full-featured FTP client for webOS
Twitter: @pcworldSoftware; e-mail (contact, support, buy apps via PayPal) if you like what I'm doing, feel free to (alternatively in USD)
pcworld is offline   Reply With Quote
Old 12/31/2011, 11:08 AM   #14 (permalink)
Member
 
Posts: 62
Quote:
Originally Posted by pcworld View Post
Btw, on webOS 1.4.5 there was/is a patch for Facebook chat which just redirected talk.google.com to the IP of chat.facebook.com (via /etc/hosts), that may be easier than modifying binary files.
Sure, but then you have to choose between google talk and fb chat :S
__________________
If you like what i do, and can spare a few bucks, you can always
gnomesgames is offline   Reply With Quote
Old 12/31/2011, 11:12 AM   #15 (permalink)
Homebrew Developer
 
Posts: 697
Quote:
Originally Posted by gnomesgames View Post
Sure, but then you have to choose between google talk and fb chat :S
Are you sure? I think GTalk still worked.
__________________
Apps: Explorer for Dropbox a Dropbox app for webOS that actually works (TP+phones), 3-panel-interface
File Explorer fast and simple file manager (root support on webOS 3)
QuickChat for Facebook real-time Facebook chat
Archive Manager extract and create archives (zip, rar, 7z, )
FTPit! full-featured FTP client for webOS
Twitter: @pcworldSoftware; e-mail (contact, support, buy apps via PayPal) if you like what I'm doing, feel free to (alternatively in USD)
pcworld is offline   Reply With Quote
Old 12/31/2011, 11:31 AM   #16 (permalink)
Member
 
Posts: 62
Quote:
Originally Posted by pcworld View Post
Are you sure? I think GTalk still worked.
Hum.. Not sure but if the patch just modified the /etc/host, then every single connection to talk.google.com would be redirected to chat.facebook.com, so GTalk whouldn't work
__________________
If you like what i do, and can spare a few bucks, you can always
gnomesgames is offline   Reply With Quote
Old 12/31/2011, 11:34 AM   #17 (permalink)
Homebrew Developer
 
Posts: 697
Quote:
Originally Posted by gnomesgames View Post
Hum.. Not sure but if the patch just modified the /etc/host, then every single connection to talk.google.com would be redirected to chat.facebook.com, so GTalk whouldn't work
I think the reason this worked was that webOS 1.4.5 usually uses another domain for GTalk... (but I'm not sure)
And to make it work you had to use asdf@chat.facebook.com, not @gmail.com as username.
__________________
Apps: Explorer for Dropbox a Dropbox app for webOS that actually works (TP+phones), 3-panel-interface
File Explorer fast and simple file manager (root support on webOS 3)
QuickChat for Facebook real-time Facebook chat
Archive Manager extract and create archives (zip, rar, 7z, )
FTPit! full-featured FTP client for webOS
Twitter: @pcworldSoftware; e-mail (contact, support, buy apps via PayPal) if you like what I'm doing, feel free to (alternatively in USD)
pcworld is offline   Reply With Quote
Old 12/31/2011, 11:42 AM   #18 (permalink)
Member
 
Posts: 62
Quote:
Originally Posted by pcworld View Post
I think the reason this worked was that webOS 1.4.5 usually uses another domain for GTalk... (but I'm not sure)
And to make it work you had to use asdf@chat.facebook.com, not @gmail.com as username.
Ah, yes no i get it ! Based on this :
Code:
if (strcmp(prplProtocolId, "prpl-jabber") == 0
    && g_str_has_suffix(transportFriendlyUserName, "@gmail.com") == FALSE
    && g_str_has_suffix(transportFriendlyUserName, "@googlemail.com") == FALSE)
{
    // Special case for gmail... don't try to connect to mydomain.com if the
    // username is me@mydomain.com. They might not have
    // setup the SRV record. Always connect to gmail. 
    purple_account_set_string(account, "connect_server", "talk.google.com");
}
If you put something else that gmail.com or googlemail.com, then the server is talk.google.com. Which mean that redirecting this one would redirect every non gmail account to the one you want (for exemple facebook).
Still, on 2.x and 3.x, validation of the email wouldn't work as WebOS check if the email is a valid google account, so you would still have to go and modify validation files. And if you patch binaries you can add any XMPP account, not only Facebook .
__________________
If you like what i do, and can spare a few bucks, you can always
gnomesgames is offline   Reply With Quote
Old 12/31/2011, 11:46 AM   #19 (permalink)
Homebrew Developer
 
Posts: 697
Quote:
Originally Posted by gnomesgames View Post
Ah, yes no i get it ! Based on this :
Code:
if (strcmp(prplProtocolId, "prpl-jabber") == 0
    && g_str_has_suffix(transportFriendlyUserName, "@gmail.com") == FALSE
    && g_str_has_suffix(transportFriendlyUserName, "@googlemail.com") == FALSE)
{
    // Special case for gmail... don't try to connect to mydomain.com if the
    // username is me@mydomain.com. They might not have
    // setup the SRV record. Always connect to gmail. 
    purple_account_set_string(account, "connect_server", "talk.google.com");
}
If you put something else that gmail.com or googlemail.com, then the server is talk.google.com. Which mean that redirecting this one would redirect every non gmail account to the one you want (for exemple facebook).
Still, on 2.x and 3.x, validation of the email wouldn't work as WebOS check if the email is a valid google account, so you would still have to go and modify validation files. And if you patch binaries you can add any XMPP account, not only Facebook .
Makes sense. Will try your tutorial on my Pre2 soon.
(too bad FB's XMPP is pretty buggy )
__________________
Apps: Explorer for Dropbox a Dropbox app for webOS that actually works (TP+phones), 3-panel-interface
File Explorer fast and simple file manager (root support on webOS 3)
QuickChat for Facebook real-time Facebook chat
Archive Manager extract and create archives (zip, rar, 7z, )
FTPit! full-featured FTP client for webOS
Twitter: @pcworldSoftware; e-mail (contact, support, buy apps via PayPal) if you like what I'm doing, feel free to (alternatively in USD)
pcworld is offline   Reply With Quote
Old 12/31/2011, 11:49 AM   #20 (permalink)
Member
 
Posts: 62
Quote:
Originally Posted by pcworld View Post
Makes sense. Will try your tutorial on my Pre2 soon.
(too bad FB's XMPP is pretty buggy )
I found out it work quite well on my pre3, but it uses alooot of battery ^^, and at the connection take one minute or two to gather contact names and pictures (in the mean time you see something like -145513131546631@chat.facebook.com instead of contact names)
__________________
If you like what i do, and can spare a few bucks, you can always
gnomesgames is offline   Reply With Quote
Thanked By: sshaka
Reply

 

Tags
facebook chat, tutorial

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0