would this be hard? so that status shows up in activity feeds?

CommentFileSizeAuthor
#6 fbs_activity_integration.txt4.87 KBicecreamyou

Comments

icecreamyou’s picture

Title: integrate with activity on d6 via a contrib module? » Activity Integration (in D6 Branch)
Assigned: Unassigned » icecreamyou
Status: Active » Postponed

Activity generally provides a useful API, so it will not be hard (there is already Activity integration in the D5 branch of facebook_status). However, there is no stable version released of Activity for D6 yet, and the API is going to change; so I won't write code for it until the API is stable.

You may also want to check out activity_log which will probably achieve what you want without requiring other modules to specifically integrate with it.

Flying Drupalist’s picture

Hi, I wonder if anyone has gotten this working yet with activity log. There's little doc for that so far... I hope that will change.

icecreamyou’s picture

Integration with Activity Log really just means integration with Rules. I have no idea how to do that, and no need to learn, so if it happens, it's not coming from me.

...probably.

icecreamyou’s picture

Title: Activity Integration (in D6 Branch) » Activity 5.x-4.x/6.x-1.x Integration
Component: Code - Hooks » Code - Functionality

Making it easier to find to point to for duplicates.

Apollo610’s picture

Subscribing (interested in D6 integration)

icecreamyou’s picture

StatusFileSize
new4.87 KB

I *think*, although I'm not sure, that all you have to do to get Activity integration in 6.x is to paste the contents of the attachment into your .module file. Let me know if it works. (If it doesn't, I won't fix it right now, but if it does I'll go ahead and commit it.)

Apollo610’s picture

Thanks ICY, I appreciate the quick turnaround.

I'm not quite sure how to implement this... looking at how Activity's Contribs are configured, I created a folder called facebookstatusactivity.module and dropped it into the activity contribs folder, created the .info, and installed it but it's not working (it looks like the entire .module is being printed to the console).

I'm assuming that there would need to be changes on both side - FBS' to allow Activity to hook into it, and then Activity's calls to pull and store the FB statuses in the activity tables... it looks like your file might solve the first part, just need someone familiar with activity to pull the 2nd part? If this is the case I'll raise an item over in the activity queue or respond to one that exists...

Thanks again -

icecreamyou’s picture

paste the contents of the attachment into your .module file

It's that simple.

The facebook_status.module file, that is.

Apollo610’s picture

I tried that as well... that doesn't work either, nothing outputs to the activity queue (activity; activity/mine).

Just to be thorough, I also deactivated the FBS module. Re-enabled it. Ran update.php, and flushed cache to make sure everything was in sync. Still no dice.

icecreamyou’s picture

It won't work until you save the tokens at admin/settings/activity.

Apollo610’s picture

Tried that and still isn't working for me, although "Faceboo" does come up as an option under the settings/activity... activity module itself isn't displaying anything on its side.

Flying Drupalist’s picture

Right, no new activity was created even after saving the token values.

But thanks for trying this.

icecreamyou’s picture

Title: Activity 5.x-4.x/6.x-1.x Integration » Activity 6.x-1.x Integration
Status: Postponed » Active

Oh... /facepalm

I forgot, you need to call facebook_status_activity() in the appropriate places in the module. :-/

Whatever. I'll put this in the next release, I'm pretty sure it will work.

Apollo610’s picture

No worries, thanks ICY for taking the time to try to hammer this out adhoc.

If you need testers I'm working on a beta for my site and will be more than happy to run things through the ringer.

icecreamyou’s picture

Status: Active » Needs review

Committed to dev.

I can't test this at the moment so any testing anyone can do is great.

Apollo610’s picture

Nice, snagged the .module from CVS and it works...! Haven't extensively tested but the basic test cases look good... thanks!

icecreamyou’s picture

Title: Activity 6.x-1.x Integration » Activity 5.x-4.x Integration
Version: 6.x-1.x-dev » 5.x-1.x-dev
Status: Needs review » Reviewed & tested by the community

Sweet. If you find any problems with the integration, please open a new issue.

The only change that needs to be added to 5.x is an extra parameter in the one activity_insert() call... there's no great way to support both Activity 5.3 and 5.4 at the same time, but I have discovered a kind of hack using function_exists() that is sufficient. I'll add it in when I have time to figure out the details.

icecreamyou’s picture

Title: Activity 5.x-4.x Integration » Activity 6.x-1.x/5.x-4.x Integration
Version: 5.x-1.x-dev » 6.x-1.x-dev
Status: Reviewed & tested by the community » Fixed

Committed to 5.x as well now.

igorik’s picture

Hi

There is a patch for commenting activity - http://drupal.org/node/355022
does it means that now after integration with activity, it will be possible to comment Facebook like status (if I patched activity) or it will be not work with facebook status?

thanks
Igorik
http://www.somvprahe.sk

icecreamyou’s picture

igorik, the commenting should work with any Activity message. It doesn't have to integrate explicitly with anything. So in short, the answer to your question is yes, it will work.

Of course, you could always just try it. :-P

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.