Topic-icon share button prevents status update and displays weirdly thereafter

Active Subscriptions:

None
Hi Alex, I followed instructions and had the various share and facebook like links inserted into the activity stream. However. when I attempt to post a status update the status share button appears to work, but no update appears and the links then display as code:

File Attachment:


I'd appreciate your assistance, thank you.

Jude
The topic has been locked.
Support Specialist
Can you explain a little more about what's happening:

but no update appears

Do you mean no update appears in JomSocial or in Facebook or other social networks? Adding those tags won't make the status appear in the social networks, so I just want to make sure of what you're expecting.

and the links then display as code:

I see the code in the bottom on your picture. Does that code remain after you refresh the page, or is it just when the update is inserted into the stream?

Let me know those answers and we'll gladly help investigate more.

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

None
Hi Alex, I'll try to clarify.
The status does not appear in the Jomsocial activity
It did appear in Facebook via Twitter (I've set it up that way, unless posted directly to facebook manually)
The code does not remain on refresh
The Jomsocial status does not get updated on refresh

Many thanks,
Jude
The topic has been locked.
Active Subscriptions:

None
Hi Alex, any suggestions on this?

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

None
Hi Alex, yes, I'm a nag :=D So sorry, but this weekend is my deadline to finish this site....

To summarize: I have created the copy activities.index.php and added the code as per the recommended article. I did have to add in the url as there was an error message otherwise:
// Show debug message

        if(empty($html))

        {

            // enable only during stream debugging

            // echo 'UNPROCESSED STREAM POST: ' . $act->app;

            $showStream = false;

        }

        ?>

            {SCGooglePlusOne}{JLinkedShare}{SCTwitterShare}{JFBCLike show_send_button=false href=http://classicromancerevival.com<?php echo str_replace(JUri::base(true).'/', '', JUri::base()) . CRoute::_('index.php?option=com_community&view=profile&userid='.$act->actor.'&act='.$act->id); ?>}
			
			</li>

The buttons display - though they display vertically, not horizontally. That is an issue too, but relatively minor at this point.

When any status is added to the activity stream, the status now posts (did not before, but did automatically post through to twitter and facebook) and the buttons now display:


File Attachment:


A developer assisting me with other things on the site noted the following: NOTE: JFB connect social code showing share icons (plugin- System - JFBCSystem at plugin manager in backend) at activity stream when you are in that page via any link. Once you post any activity that social code doesn't get icons due to Ajax request, its because of the customizations done by your developer.

I would greatly appreciate your assistance, thank you.

Jude
The topic has been locked.
Support Specialist
Jude,
Sorry for the delay. We had to do a bit of investigation to test the issue and find the best solution. It looks like the best thing to do is to not use our JFBCxyz tags at all in this case due to the AJAX request. The AJAX request will not re-fire our system plugin, as your note mentioned above, which causes the issues you're seeing.

We've tested a few things and don't have a full solution, but have something that should get you started and at least not look so bad during an update. For the change, edit the activities.index.php file you created and replace the {JFBCxyz}.. tags that you put in there with the following:
<?php JFactory::getDocument()->addScript('http://platform.twitter.com/widgets.js');
            JFactory::getDocument()->addScriptDeclaration("(function() {
                            var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
                            po.src = 'http://apis.google.com/js/plusone.js';
                            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
                          })();");
            $url = str_replace(JUri::base(true).'/', '', JUri::base()) . CRoute::_('index.php?option=com_community&view=profile&userid='.$act->actor.'&act='.$act->id); ?>
            <div class="jfbclike"><div class="fb-like" data-href="<?= $url ?>" data-show-faces="true" data-send="false"></div></div><div class="sc_gplusone"><g:plusone href="<?= $url; ?>"></g:plusone></div><div class="jlinkedShare"><script type="IN/Share" data-url="<?= $url; ?>"></script></div><div class="sc_twittershare"><a href="http://twitter.com/share" class="twitter-share-button" data-url="<?= $url ?>">Tweet</a>
That's a lot more code, but it's required since it's doing what our easy-tags were doing initially. The main problem with the code above is that on the AJAX refresh, the buttons will be missing. That's because they are loaded through Javascript and the AJAX request being made doesn't parse new Javascript. The good news is that it seems to work and it looks good, in general. It'd be nice if all the social buttons re-appeared, and something we can look into more, but I wanted to get this bit of code to you now since it sounds like you're on a deadline.

I hope that helps, and good luck,
Alex
The topic has been locked.
Active Subscriptions:

None
Hi Alex, thanks for this, I do appreciate the effort on my behalf. Unfortunately, my test users picked this up immediately as a bug. Also, only google+ and twitter showed up, with an "error" where facebook should have been. I'll have to delay the launch. In the meantime, I've asked an independent who has helped me with other stuff to look at what they can do. I'll keep you posted, but this is a critical thing for me so I will have to wait on a solution.

I appreciate you responding on a weekend, thank you,
Jude
The topic has been locked.
Active Subscriptions:

None
Hi Alex, just trying to clarify something. I saw the following at: www.sourcecoast.com/joomla-facebook/jomsocial

Configure JFBConnect to automatically post new images, some group activity, or status updates that your users create on your site. Each post will have rich Open Graph Tags associated with them ensuring a great looking post including links back to your site.

Even better, create your own actions that you want posted to Facebook. You'll be able to fully control the types of activities that are posted automatically by your users. Your users also have the ability to disable each type of automatic sharing, so you don't have to worry about privacy concerns or unhappy users.

Is this set up automatically, and is the fb share button that I'm trying to add simply for other users to share something they wish to share, i.e. someone else's status update. Perhaps if I had more clarity I can make some kind of a decision here.

Many thanks.
Jude
The topic has been locked.
Support Specialist

Is this set up automatically, and is the fb share button that I'm trying to add simply for other users to share something they wish to share, i.e. someone else's status update. Perhaps if I had more clarity I can make some kind of a decision here.

When you enable the Social Profiles - JomSocial plugin, there is an option for "Push Status Updates". When enabled, and a Facebook user is logged in and posts a status update, it should go to their Facebook Wall.

For feature like pushing an image to Facebook on upload or joining a group, you need to create Open Graph Actions for that. We have a lot of documentation on how to setup open graph actions for Joomla . Hopefully that will get you started. We're working on updating the docs with more example configuration screen shots as well to make the process easier.

I hope that helps,
Alex
The topic has been locked.
Support Specialist
Oh, as to your issue with the buttons dissappearing after a status update.. we are looking into that, but it comes down to JomSocial not calling an AJAX request which is allowed to trigger more Javascript. That's a normal thing to do, so they aren't wrong in doing so. The problem is that it means the tags we're adding aren't being re-parsed and we need to call Javascript to do that.

Let me know if this is still an important need or you based on the information above.

Thanks,
Alex
The topic has been locked.