Hi
I am using heartbeat along with facebook_status module. Basically, what i needed to add a heartbeat activity whenever someone posts a facebook status message. That worked fine using rules. Now my problem is when a user puts @ tags in the facebook status message. In such a case i wud want to post the message with uid as the poster's uid and uid_target as that user's uid whose name is in the @ tag. It will work great for a single user, but when we have multiple @ tags in a status message, i am at a loss of what to do.
Perhaps allowing multiple uid_target ??

Thanks
Suchi

Comments

Stalski’s picture

Good one.I am not sure why it does not work. Can you provide me a couple of screenshots and textual messages that you see now (and the ones that you would like to see).
thx

gargsuchi’s picture

basically in my rule, i have php code which is doing the heartbeat add.
Currently I am picking up the rids from the facebook status (rids is the uids of the users addresses by @tag) and i am adding multiple heartbeat_activity rows for each of this rid.

Suchi

Stalski’s picture

Never tested it with php-code.
I would suggest you do what you are doing and try to group this type of messages in a clever way. My best guess is to have something like this:

- Single message: !user says something to !others
- Grouping message: !user says something to %others%

IN this case, you would have the tokens for rid (requestee uids) in 1 single instance. As you mentioned, you will add them for each requestee. Grouping the message type together, it would group @userX, @userY, @userZ together in the "others" variable and could be a sollution.

I cannot see your implementation ofcourse. In fact I dont understand why it cannot work without the php code and the multiple logging. I have it working on the demo site like that i thought. or not?

Stalski’s picture

Status: Active » Closed (works as designed)

Yes after giving it long thoughts, i cannot implement this in heartbeat. The change would be so big that i have to encounter too much problems. Also the upgrade path would be hard.
so it could work for you with some tries with logging multiple messages in stead of one and try the grouping. I am not sure if this would work though. I just might.
So forgive me for setting this on "by design". The implementation is too big a change.

regards,
Stalski

gargsuchi’s picture

ok - no issues. I have put in a workaround that just works for my use case.

Thanks
Suchi

BIGREDPAUL’s picture

Hi gargsuchi
Was wondering what PhP you used to get the user id of the tagged user. If a user is tagged in a status I would like that status to appear on the personal heartbeat of the target.
I'm hopless when it comes to PHP.

marinex’s picture

Hi,
@gargsuchi, I would like implement your solution based on php code. Can you help me what can I do or what can I set and What php code can I use?

Thanks M.