× Joomla Facebook Connect support forum

Topic-icon How can i pull a user's status updates from fb automatically?

Active Subscriptions:

None
How can i pull a user's status updates from fb automatically? We want to sync the user's fb profile with their joomla one and for that we need to regularly pull updates from fb (not just on login) - there are a number of forum posts about the topic, but I could not find a resolution. Let me know how to do this. Thanks!
The topic has been locked.
Active Subscriptions:

None
Any update on this one? Thanks!
The topic has been locked.
Support Specialist
Grrr.. I thought I took care of you this weekend! :D Sorry I missed this one.

So, we looked into this a bit ago and wanted to use Facebook's Real Time Updates feature. It basically has Facebook 'ping' your site when a user's info is updated, and then JFBConnect would have to just go grab that updated info an import it. However, you can only get real-time updates for certain fields, and status isn't one. Feed is, but that would include things like "Bob Likes SourceCoast" or even a post from Bob's mom in his wall.. not great stuff.

So, to do this, you'd need to do polling, which Facebook doesn't forbid, but they don't like it much either if you're overly aggressive about it, or have lots of users, since each user is a request to their servers every 'x' minutes, or whatever.

With that said, to poll for a user's status, you need an offline-access token. This requires an extra app permission and would need to be stored in the DB. This is something we're planning to start storing, if available, in either 4.1 (if we can squeeze it in) or in 4.2 definitely. With that token, you could then create a script to poll for the status update for each user. We already have the function to import the status (which would need just a minor tweak, but the code is there.

All said, it's not something that's just a few lines of code. We're working toward this, as offline access tokens allow you to do a lot of cool things (if granted by the user). However, it's not ready yet. If you have a developer, we can gladly help guide them in the process. Otherwise, I think it's something that we'll either have implemented in 4.2, or at that point, it would just be a few lines of code to get something going. We come out with new feature releases (4.1, 4.2, 4.3, etc) about every 3 months, and 4.1 is due later this month... just to give you a general timeline.

Hope that all helps, in my very wordy way.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
Ok, thanks for the detailed response, lots of great info there.

So do you know if it will be in 4.1 this month? - it's possible we can wait that long, but if not we are going to need to figure out some sort of workaround. We don't need realtime updates necessarily, even once a day would be ok for the time being.

It looks like Jomsocial FB connect is able to get the update? Is there any way to use their functionality for this particular feature (as a stupid question - could Jomsocial/JFBC share an FB key or something like that)?

Thanks!
The topic has been locked.
Support Specialist
Automatically importing status updates will definitely not be in 4.1. It's possible we'll have the storing of the user's authorization token, which would let you (or a developer) add polling of the status updates from Facebook even when the user is not logged into your site. We're still looking into storing that token though, and I can't guarantee it will be in the 4.1 release. It will definitely be in the 4.2 release, but I still can't guarantee the polling of status updates would be in 4.2 simply because we haven't done any code investigation on that yet (we need to make sure it would work for sites with 10's of thousands of users, and that can be tough to test for an automated process).

JomSocial, as far as we know, gets the user's status update during login or registration, similar to JFBConnect. I'm almost positive that they do not pull in status updates from Facebook automatically either.

As for sharing a FB key between JomSocial and JFBConnect, no, you shouldn't enable JomSocial's Facebook functionality at all. They are incompatible in multiple ways. Everything JomSocial does, we believe, is in JFBConnect, in addition to a lot of other features that are not available in JomSocial.

Hope that explains,
Alex
The topic has been locked.
Active Subscriptions:

None
Ok, thanks. Will have to figure out some kind of workaround until 4.2 comes out.
The topic has been locked.
Support Specialist
We'll be able to let you know in a week'ish if we can get the offline token storage into 4.1. If so, we'd be able to help you (or your developer) implement some kind of polling to get the user's status. Just trying to finish up a few other things for that release first.

Thanks,
Alex
The topic has been locked.