maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] Effing - Facebook Status Updater (https://talk.maemo.org/showthread.php?t=64228)

rmerren 2010-10-23 05:55

[Announce] Effing - Facebook Status Updater
 
I have written a Facebook status update application, which can now be found in the extras-devel repository under the name "effing". Following the Linux model of "do one thing, and do a half-assed job of it" (OK...I might have modified that a little bit), I wanted a simple app that shows my current Facebook status and lets me update it.

I normally update through the http://touch.facebook.com site, but I think that this activity is ripe for a dedicated app to do it without waiting for web pages to load. I originally wrote this app in Python (using Qt through PySide) but decided to rewrite it in C++/Qt because I didn't like the delays while starting the app and because I thought it would be cool to give that a try.

I have to say that both Qt and the QtCreator SDK are very good. I was able to build and run the app directly on my Ubuntu laptop (both as a desktop app and as a simulated phone app). One click gave me a deb package that I could install on the phone and test. And Qt takes care of all the little details like properties files that can be radically different on different platforms.

The app uses QT networking to communicate with the facebook graph api, and uses webkit to show the facebook login window (facebook deviates a bit from the OAuth standard by requiring direct login instead of allowing you to send in a username/password combo for the user, so you have to show the login page with a webkit browser widget and check for a particular redirect address). And (though they don't really seem to promote it for this, so it was a bit hard to find) the ScriptEngine handling of json was extremely easy...better than the python equivalent. The whole thing worked just as well on the amd64 platform as on the simulator or actual phone. So I give the Qt C++ stuff a big thumbs up.

The one thing that was a bit difficult was packaging it to send to extras. The QtCreator spits out an armel deb package that can be installed right onto the phone, but I had a hard time finding any info on what I needed to do to get that onto Extras. I did find some example code in garage and a few entries on this site that gave some explanation, but there was a significant amount of trial and error over the past several days to get this working. One thing that made it more difficult was that I was convinced I should be able to do everything directly on my 64 bit ubuntu laptop without having to resort to scratchbox (which I had to install on a 32 bit VM last time I tried it) or some other crazy method. It turns out I was right.

In any case, the packaging (when done from the ubuntu command line) is quite simple, and I will put together a primer on how to take a working QT creator app and turn it into the files for submission to extras.

So please give the app a try and let me know what you think. Right now it is really very basic (which is what I wanted) but I am considering a few other features such as displaying comments that are posted on your status, indicators for messages, and maybe some jazzier looks. I am not looking to recreate facebrick (which I think is great, and I recommend if you are looking for a full-featured facebook app, though I have not been able to make it work for some time now due to a mysterious error). I think the N900 browser is superior to anything else mobile for browsing facebook...I just wanted to more easily update my status.

One final note: I would like to include facebook places functionality at some point, but Facebook has not made that available through the api (it is read only...no ability to share your location via the api). But I will keep my eye out for that to change.

The source is available on gitorious (I need to update it to the current point) and I am working on getting the bug tracking up. So if you have some issues, post them here until I get the bugs going.

TomJ 2010-10-23 06:47

Re: [Announce] Effing - Facebook Status Updater
 
I would quite like to be able to update my status via the IM status updater... I had hoped that it would be possible with the Facebook Conversations plugin, but alas no.

Anyhow, once i get my n900 back from Nokia, I'll give your app a try. Thanks for pushing it out for us.

xenomorph72 2010-10-23 08:09

Re: [Announce] Effing - Facebook Status Updater
 
thanks for the app, it looks like it could possibly be a really handy addition to my phone.
im having a little problem with it at the moment. ive tried logging in multiple times with no joy, ive turned off the auto capitalisation but it still happens when typing my usarname and pass, once i have put them in and click login, nothing happens.

rmerren 2010-10-23 15:34

Re: [Announce] Effing - Facebook Status Updater
 
The capitalization seems to be related to this bughttp://bugreports.qt.nokia.com/browse/QTBUG-12171

I am going to explore some possible workarounds, including using the full and not touch version of the login box. I have experienced this with some other apps as well and I am pretty sure that there is a way to deal with this, though the bug listed above says the only way is to use the experimental qt packages.

The issue goes away if you first click in the "password" box then click in the "email or phone" box and start typing. Also, it only happens with the hardware keyboard, so use the on-screen keyboard and see if you can log in.

I will try some things and work on a new release asap.

CasTTeLLo 2010-10-23 15:40

Re: [Announce] Effing - Facebook Status Updater
 
if u change the title and add N900 image it would be cool...i'm still using facebrick coz of i dont like the name...

rmerren 2010-10-23 15:58

Re: [Announce] Effing - Facebook Status Updater
 
I should also mention that the Facebook post will say "via effing N900" on it. Mildly offensive to some (like CasTTeLLo), hopefully a bonus to others. If that offends you, you might not want to use the app. If that REALLY offends you, you might want to get an iPhone where Steve Jobs would personally remove such an app from the repository.

uvatbc 2010-10-23 16:44

Re: [Announce] Effing - Facebook Status Updater
 
Quote:

Originally Posted by rmerren (Post 848763)
I should also mention that the Facebook post will say "via effing N900" on it. Mildly offensive to some (like CasTTeLLo), hopefully a bonus to others. If that offends you, you might not want to use the app. If that REALLY offends you, you might want to get an iPhone where Steve Jobs would personally remove such an app from the repository.

How about providing a configurable title?
I love posting with "the effing N900" but others may not.

rajil.s 2010-10-23 16:59

Re: [Announce] Effing - Facebook Status Updater
 
imho "posted using Nokia N900" will be better.

newbieeee 2010-10-24 12:22

Re: [Announce] Effing - Facebook Status Updater
 
i have installed the app but it is not letting me logged in .... whenever i enter my login details .. it does nothing ... despite attempting it several times ...

rmerren 2010-10-24 17:05

Re: [Announce] Effing - Facebook Status Updater
 
The "posted using" is not really configurable. It comes from the name of the facebook application whose app id is used to log in and communicate. I may look into allowing a selection among multiple application ids, but I need to make sure that is not a violation of facebook terms of service for the api.

I will check the login problem, but I think it is related to the QWebkit bug that was mentioned before. I am testing a change that may give a workaround, and which could resolve that issue as well. I am having trouble duplicating the issue, which means that it also could be a dependency problem, and I will double-check that I have all dependencies included.

ankkursoood 2010-10-27 13:32

Re: [Announce] Effing - Facebook Status Updater
 
im trying to login usinf effing application...for some time its showing no activity and then screen changes and ask for permission to allow some basic information...after choice...saying success...but then while trying to update the status its not responding at all and again coming to login screen...

in all its not working

rmerren 2010-10-27 15:05

Re: [Announce] Effing - Facebook Status Updater
 
It may be that you did not grant all of the permissions it was asking for when you logged in. Try choosing "Unauthorize" from the menu and then click refresh and log in again. It may ask you to approve some permissions. You can also remove the application within facebook and then log back in through the app and select the permissions again. If that is not the problem, let me know (I don't see a way to view any data on individual users within facebook...I don't think they let me do that.)

On another note, the 1.3 upgrade and the Qt 4.7 webkit seems to have resolved the autocomplete/capitalization problem with the login page. This is good, because nothing I was trying was helping that problem under 1.2/Qt 4.6.

So far, the top things I am working on for another release are:
  • Better debug logging to help resolve situations like this login issue (there is already some debug logging...if you start from the terminal you will already see some debug output)
  • Show comments that people have left on your status
  • Option for a G-rated application name in facebook (for people who have friended their mom and don't want to offend her)
Thanks to everyone who is using the app...I hope you are enjoying it.

rmerren 2010-11-02 05:57

Re: [Announce] Effing - Facebook Status Updater
 
I just submitted an updated version. You can now choose your tag line that shows on the status update. The "effing N900" is still available, or you can change it to the more pedestrian "N900 Status Updater" in order to avoid giving your grandmother the vapors.

There is also a limit in place to the number of characters you can submit so that you will not get the mysterious errors that happen when the status is too long for Facebook.

One more thing: I need to post a privacy policy to satisfy facebook. Until that is done, you should just be aware that I don't want your info. The app submits to and reads from facebook only and does nothing else with your info. And if you don't believe me, check out the source code for yourself on Giitorious (though you should be forwarned that it is pretty shoddy work!).

tnhh 2010-11-02 07:00

Re: [Announce] Effing - Facebook Status Updater
 
The bugtracker doesn't exist so posting here instead. I tried to install this but all I got was a copyright file.

rmerren 2010-11-02 07:20

Re: [Announce] Effing - Facebook Status Updater
 
Whoops...fixed it. Another version just uploaded!

rmerren 2010-11-02 07:41

Re: [Announce] Effing - Facebook Status Updater
 
Correction...still broken. Bad location in the .desktop file. I'll fix it in the AM.

tnhh 2010-11-02 07:50

Re: [Announce] Effing - Facebook Status Updater
 
Thanks. Managed to get it to work by running /usr/bin/effing/effing/effing from an xterm. Strange place for an executable though!

rmerren 2010-11-02 13:46

Re: [Announce] Effing - Facebook Status Updater
 
That string of "effings" is appropriate. But it is fixed now. The version in the repos actually works.

And you can switch between the two taglines at will. You need to authorize them separately (it will prompt you for login and tell you which it is using), but it will remember both authorization keys separately.

elie-7 2010-11-02 20:50

Re: [Announce] Effing - Facebook Status Updater
 
if only this was a widget where i can update my status from my desktop....
but great app man.

CasTTeLLo 2010-11-03 00:25

Re: [Announce] Effing - Facebook Status Updater
 
i cant update via app mang coz conflict with the new firmw updater...i'm still with pr 1.2... so how?? need pr 1.2 ver...thanks

igorlt 2010-11-03 00:40

Re: [Announce] Effing - Facebook Status Updater
 
Screenshots?

raverpol 2010-11-03 01:02

Re: [Announce] Effing - Facebook Status Updater
 
well, I installed effing after PR 1.3 but when I tap the icon nothing's opening :(

rmerren 2010-11-03 05:28

Re: [Announce] Effing - Facebook Status Updater
 
Quote:

Originally Posted by raverpol (Post 861618)
well, I installed effing after PR 1.3 but when I tap the icon nothing's opening :(

Try to upgrade again. I uploaded a version late tuesday night that had a bad path in the .desktop file. I fixed it Wednesday morning with a new version, and you may not have the catalog updated yet.

rmerren 2010-11-03 05:34

Re: [Announce] Effing - Facebook Status Updater
 
Quote:

Originally Posted by CasTTeLLo (Post 861589)
i cant update via app mang coz conflict with the new firmw updater...i'm still with pr 1.2... so how?? need pr 1.2 ver...thanks

I have upgraded my qt creator and it is putting a dependency on Qt 4.7 in the control file. It should work with 4.6, but the packaging won't let it now. I am not going to repackage for backwards compatibility (I am not even sure how to make it downgrade the QT dependency, let alone how to do it so it will work for 1.3 users with no problems).

You can download the .deb, crack it open, and install the files manually. An easier method would be to upgrade to 1.3. It really does fix a bunch of bugs--one in particular that was plauging the login page on this app.

thesnake505 2010-11-03 20:00

Re: [Announce] Effing - Facebook Status Updater
 
Quote:

Originally Posted by elie-7 (Post 861378)
if only this was a widget where i can update my status from my desktop....
but great app man.

this app is brilliant!!! but deffinatly needs to be a widget! is there any chance??? cheers snake

rmerren 2010-11-05 18:57

Re: [Announce] Effing - Facebook Status Updater
 
I just posted an update...should show up in the repo soon. I fixed the problem with international characters (accented, umlauted, tildefied, etc.) disappearing.

For those that are actually interested in the technical parts (and in case someone searches for this very problem) here are the details:

the facebook graph api allows you to submit status updates (or other feed info) as post data in an HTML request. I was submitting the raw request string, which works great for gringo-speak. But when people whose languages were not simplified by the rough journey across the atlantic ocean tried to use characters with accent marks, these marks would disappear.

The solution was to "percent encode" the string before placing it in the post data. This was done in Qt with the following:
Code:

QString encodedStatus(QUrl::toPercentEncoding(status,"",""));
Where status is the plaintext and the resulting encodedStatus is the encoded value to include in the post data.

uvatbc 2010-11-05 19:25

Re: [Announce] Effing - Facebook Status Updater
 
Quote:

Originally Posted by rmerren (Post 864543)
I just posted an update...should show up in the repo soon. I fixed the problem with international characters (accented, umlauted, tildefied, etc.) disappearing.

For those that are actually interested in the technical parts (and in case someone searches for this very problem) here are the details:

the facebook graph api allows you to submit status updates (or other feed info) as post data in an HTML request. I was submitting the raw request string, which works great for gringo-speak. But when people whose languages were not simplified by the rough journey across the atlantic ocean tried to use characters with accent marks, these marks would disappear.

The solution was to "percent encode" the string before placing it in the post data. This was done in Qt with the following:
Code:

QString encodedStatus(QUrl::toPercentEncoding(status,"",""));
Where status is the plaintext and the resulting encodedStatus is the encoded value to include in the post data.

Thanks - not just for the update (those enhancements are good, but not used by me), but also for the code pro-tip.
I used to URL encode and then pull out the relevant parameters. Your method is more elegant.

rmerren 2010-11-05 19:36

Re: [Announce] Effing - Facebook Status Updater
 
Quote:

Originally Posted by uvatbc (Post 864563)
Thanks - not just for the update (those enhancements are good, but not used by me), but also for the code pro-tip.
I used to URL encode and then pull out the relevant parameters. Your method is more elegant.

I am a very elegant man.

elie-7 2010-11-06 21:23

Re: [Announce] Effing - Facebook Status Updater
 
the fastest way i know to update youe fb satus.
it would be faster with a widget ;)

RAZOR 2010-11-09 15:12

Re: [Announce] Effing - Facebook Status Updater
 
Is it possible to have "via effing N900" under wall posts? Does this app already do that?

rmerren 2010-11-09 19:30

Re: [Announce] Effing - Facebook Status Updater
 
Quote:

Originally Posted by RAZOR (Post 868158)
Is it possible to have "via effing N900" under wall posts? Does this app already do that?

Not sure what you mean. Status updates are basically wall posts. I dont think FB makes a distinction. But give me more of an idea what you are thinking about.

rajil.s 2010-11-10 17:50

Re: [Announce] Effing - Facebook Status Updater
 
Would it be possible for you to look into facebricks authentication mechanism, because it not working at the moment?

debjitbis08 2010-11-11 07:36

Re: [Announce] Effing - Facebook Status Updater
 
Quote:

Originally Posted by TomJ (Post 848476)
I would quite like to be able to update my status via the IM status updater... I had hoped that it would be possible with the Facebook Conversations plugin, but alas no.

You can use PixelPipe...

-Debjit

meLi 2010-11-11 12:40

Re: [Announce] Effing - Facebook Status Updater
 
can u give an option either to display eff icon or N900 mobile logo ?

http://img696.imageshack.us/img696/7165/effm.png

TQ

rmerren 2010-11-12 07:51

Re: [Announce] Effing - Facebook Status Updater
 
Just posted a new version (0.4.0). Instead of showing the current staus, the upper window now contains the past 10 statuses, including any comments posted. The newest status is on top, with the rest in reverse time order.

There was also some invisible refactoring that was mainly aimed at allowing multiple hierarchically arranged message types (though it currently only uses status and comment).

rmerren 2010-11-12 17:10

Re: [Announce] Effing - Facebook Status Updater
 
If you have used the upgraded version, you might notice that the upper text box (with the older statuses in it) is not scrolling with any finger motions. I think this is due to the way Qt implemented this object on Maemo5, possibly to meet with the maemo5 design guidelines.

In any case, I am looking at the issue. If you really need to scroll that box in the meantime (hopefully not long) just tap it once to give it the focus and then use the arrow keys to scroll it.

rmerren 2010-11-13 00:42

Re: [Announce] Effing - Facebook Status Updater
 
The scroll problem is resolved. I was using a QTextEdit to display the existing status. I switched that to a QTextBrowser, which allows finger scrolling and has a few other features that might be useful later on.

I think the interface is now slightly uglier (if that were possible) because the QTextBrowser is square and the other items have rounded corners. But resizing the upper window to be a little larger helped a little.

I have a few more features to add, so stay tuned over the next week or so.

P.S. It may take a short while to get this uploaded. I added a key to sign my packages, and now I am having trouble getting it recognized by the uploader.

uvatbc 2010-11-13 02:35

Re: [Announce] Effing - Facebook Status Updater
 
Have you considered moving to QML? It is simpler and you can concentrate on the functionality while the UI remains untouched.

rmerren 2010-11-13 15:42

Re: [Announce] Effing - Facebook Status Updater
 
Upload was finally successful. The problem was that I was signing my packages (I had set up a key in GPG on my laptop, and it was being picked up automatically) and the repository servers had no way of validating it because the build servers don't have internet access to get to the key repositories. I found an obscure set of message board conversations noting this, so I thought I would mention it here in case anyone searches for it for hours like I did.

I kept receiving the message back from extras-cauldron-build that said:

Quote:

[2010-11-13 09:28:01] Processing package effing 0.5.0-1. Uploader: rmerren, builder: builder1
[2010-11-13 09:28:01] REJECTED: GPG verification of 'effing_0.5.0-1.dsc' failed. gpg returned 512, output: gpg: Signature made Sat Nov 13 07:44:27 2010 EET using RSA key ID 21E63116
gpg: Can't check signature: public key not found
If you did not provide a PGP key when you joined garage, you have no opportunity to provide one later. So you can't sign your packages.

Which means you have to build the packages with -us and -uc options, like this:

Code:

dpkg-buildpackage -us -uc -sa -S
Then they upload fine.

CasTTeLLo 2010-11-14 13:05

Re: [Announce] Effing - Facebook Status Updater
 
Quote:

Originally Posted by meLi (Post 870277)
can u give an option either to display eff icon or N900 mobile logo ?

http://img696.imageshack.us/img696/7165/effm.png

TQ

@rmerren: r u going to make it happen or not??


All times are GMT. The time now is 17:43.

vBulletin® Version 3.8.8