Custom Open Graph Action : Manual vs. On Page Load

Custom Open Graph Action : Manual vs. On Page Load

Hi Alex,

Have been following this thread on custom actions:  http://www.sourcecoast.com/forums/jfbco … jfbconnect

Created custom action "digs" / built-in object "article".  Set action to "On Page Load".  Worked fine.  So exciting!

Not hip on that automatic trigger and want the user to manually trigger action.  Changed custom action "digs" to "Manual".  Created Custom HTML module and tried your code (two versions) mentioned in above thread.

Neither worked.

Stuck.  Suggestions?

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

That's a long thread current/smile We are working on documentation for custom buttons.. and we have some planned improvements coming in the 5.1 release.

Can you let me know what Javascript you added to for the custom code? Is there a page we can see the button in action on? That will really help us narrow down what's wrong.

Another thing to note is that if you enable the "Display Facebook API Errors On Front-End" setting in the Configuration -> Facebook API section, the blue box popup may show more error messages about why the action wasn't posted. Not all problems appear there, but it can definitely help narrow down what the cause may be.

Thanks,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24140 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

Forgive me.  Newbie here.  Here's a link.  http://www.diggersdelight.com/index.php … happenings
I likely don't have things configured correctly.  Guessing based on what you've asked that I needed to create a custom object to go with the custom manual action?  All I did was switch the custom action ''digs'' to ''Manual'' and left my current ''article'' objects alone.  I do see where you can insert javascript in a custom object but had no clue what to do with it.

On another note, when I first went to Facebook app and set up action/object I had only the two I created.  Came back later and now see others.  Is that because I have active JFBConnect  like and recommend modules?  Just trying to understand what I'm seeing.

http://www.sourcecoast.com/components/com_agora/img/members/14842/Screen-Shot-2013-03-11-at-1.png

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

oh geesh, confusing myself.   
I used this in the module:  ...a href="#" onclick="jfbc.opengraph.triggerAction('234','http://yoursite.com/link-to-page...
I inserted my domain address but did not fill out  ''link-to-page''.  So went back and filled in with complete url, still no luck. 

Using complete url in module code, created a custom object, set to ''built-in'' Facebook object with
option=com_content
view=article
id=88

still no luck.  I'm sure it's something simple, but still learning here.

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

Basically, I'm trying to make a custom button that triggers a digs action on whatever page the module is presented.  Seems like the javascript in the custom object declares a specific article and the code in the module requires a specific page.

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

I know I'm going to feel like a numbskull once I understand this.  Turned on "Display Facebook API Errors on Front-End". Have tried several combinations of the following with no luck and nothing I can see on front end. 

FB App: custom action 'digs' connected to both built-in 'article' and custom 'page'

trialed with various combinations of:
JFB App: custom action 'digs' set to either built-in FB Action or not; both times automatic action set to manual
JFB App: custom object 'page' set to object type either built-in 'article' or custom 'page'
URL Query parameters: option=com_content  view=article  id=88
Module code versions from other thread with complete url to specific page and action ID inserted with href either "javascript:void(0)" or "#"

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

Second side note.  My activities log lost its ability to allow me to delete.  Also, formatting at the top is funky.
http://www.sourcecoast.com/components/com_agora/img/members/14842/Screen-Shot-2013-03-11-at-5.png

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

Whew. I'll try to hit everything you asked, but if I missed something, let me know current/smile
* When you create a "Article" object in the Open Graph area in Facebook, they will automatically create some actions.. like "Like" and some aggregations that will automatically display actions in a specific way.
* The reason the Javascript button isn't triggering is because it relies on Mootools for some of it's functions. I tried switching to the atomic template (by adding ?template=atomic to the URL) and mootools was properly being added. So, it seems like your template is forcefully removing Mootools from the output, which is something that JFBConnect needs for triggering actions like you're doing.
That may not fix the issue, but will at least (hopefully) display the blue-box error message that is occurring, which will really help.

Other notes:
* Your 'dig' action is definitely not a built-in Facebook one. You created it.. it's custom.. so don't click that box
* Your dig action should be associated with the article object.
* If you set it to 'automatic' posting and it works, then that means everything is *perfect* in the admin area. Don't change anything other than the manual setting.. at that point, you just need to focus on why your custom button isn't working.

As for the activity view, we'll have to look into that. It seems like the filters are just overflowing because you have a few big action or object names in there. Something we can definitely look into, but hopefully not a killer right now for you.

Keep me posted on the above, and definitely let us know when/where you get stumped.

Thanks,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24140 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

I can't tell what's going on at this point.  Came back to it after a break.  Custom action manual 'digs' triggered either built-in object 'article' or custom object 'page'.  It only happened a few times and now it's stuck again.  Before it was successful, I did load the atomic template on the page then hit the back button in order to see the module where the button exists.  Don't know if mootools was loaded during that time or what.

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

But assuming this eventually works out, then I'm left creating a module for every single page with the specific address of that page in the code, correct?  Is there no way to have the javascript such that I don't have to create a specific url?

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

n

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

I did not do this (had mentioned that earlier) from you other post I was following.  Could that be part of the problem?  Pretty blue box
Edit the /libraries/sourcecoast/openGraphPlugin.php file. Around line 200, you'll see:
Code:

        //TODO: Replace this with the behavior framework call used in J2.5+ (after J1.5 support is dropped)

        if ($actionAdded)

        {

            JHTML::_('behavior.mootools');

            // Include our CSS file for styling the popup

            $doc = JFactory::getDocument();

            $doc->addStyleSheet(JURI::base() . 'components/com_jfbconnect/assets/jfbconnect.css');

        }

Remove the if statement and { } altogether, so it looks like:
Code:

        //TODO: Replace this with the behavior framework call used in J2.5+ (after J1.5 support is dropped)

            JHTML::_('behavior.mootools');

            // Include our CSS file for styling the popup

            $doc = JFactory::getDocument();

            $doc->addStyleSheet(JURI::base() . 'components/com_jfbconnect/assets/jfbconnect.css');

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

Got this!  finally...  http://www.sourcecoast.com/components/com_agora/img/members/14842/Screen-Shot-2013-03-12-at-11.png

I've had display errors on front end turned on since last night.  The only thing different that triggered this is that I turned off action/objects configured for  'On Page Load'

The only action/objects on the page are for Manual trigger.

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

tried it a couple ways.  object settings that triggered that error:

custom object,  type 'article', built-in both on and off, query code:  option=com_content view=article id=88

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

Once we get the code working for the button, it's very easy to update it to use the current page, instead of having to hard-code it. I'd rather not add more complexity to the situation until we confidently get the button working.

As for the Mootools change you made to the code, yes, that's correct. I forgot that we don't load it unless required. Since you're adding the button yourself, we (JFBConnect) can't detect that it's necessary to load Mootools. Sorry about that. With the next (v5.1) release, we're planning to have a tag that will generate the Javascript and add Mootools. It will also detect if the action has already been triggered and show a different image (if desired) to say something like "You Digged This" instead of "Dig this".

The error that's being thrown is strange. It's coming from the Content Open Graph plugin. Are you using the Content plugin on for that page? Is the object or action type you created one from the Content (Article) types, or are you just using the Custom object type (like you describe in your last post)? If you're not using it, I'd recommend ddisable the Open Graph Content plugin (for now) so that just the custom plugin is loaded.

If you need the Content plugin, try re-ordering it in the plugin manager so it's either last, or first. Try both ways. One of those will likely fix that Fatal Error.

Keep us posted on what you find. You're definitely stretching the bounds of our Open Graph integration. What you're looking for is definitely possible, but the custom stuff is definitely unique to each site and not something we've fully fleshed out as much as the built-in features (reading, joining groups, etc). We'll get you going though!

Thanks,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24140 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

This is strange.  I went to the page that lists all my timeline activity.  Deleted almost all since I currently do not have that access in Activity Log. Now I no longer get the fatal error code, but rather a post to the timeline but the object the button triggers shouldn't be happening.

It appears that the Page Load Action is allowed to be triggered by the Manual Dig It button. 

Configuration is for two sets   1.  Upon Page Load    2.  Manual button

1. Upon Page Load relations.  Dig It On Page Load : Like Community Category
Action is named "Dig It On Page Load"  It is a custom action configured to allow multiple and trigger on page load
Object is named "Like Community Category" It's configuration panel reads:  Extension:content, Layout:article, Object Type:article, Built-in Facebook Object is NOT checked, set to the Community category


2.  Manual button relations.  Dig It Manual : Dig It for Diggers MAPP (or) Dig It for SS
Action is named "Dig It Manual" It is a custom action configured to allow multiple and trigger manually
Objects (two) are named "Dig It for SS" and "Dig It for Diggers MAPP"
They were created using Custom Object Type.  On the configuration panel reads: Extension:custom, Layout:custom, Object Type:article, Built-in Facebook Object is NOT checked.

So here's the deal now: 
1.  I click on the Dig It button
2. I get a post to timeline notification blue box
3.  I go to timeline activity and it shows that Dig It On Page Load : Like Community Category posted.
That button is not connected to those action/objects at all.
Should have read:  Dig It Manual : Dig it for SS (or Diggers MAPP second test page)

http://www.diggersdelight.com/index.php … ggers-mapp
http://www.diggersdelight.com/index.php … happenings

Stranger still:  I can trigger either an error code or a successful post on Diggers MAPP and Second Saturdays

From the above settings troubleshot the following, always returning to original two sets being turned on after finishing-

a. Turned off (page load) Object "Like Community Category", button no longer works, error code (nothing) posts to front.

b. Turned off (page load) Action "Dig It on Page Load", button no longer works, error code (nothing) posts to front.

c. Turned off (button) Action "Dig It Manual", button works (shouldn't), sometimes error code, sometimes times posting but oddly from  Dig It On Page Load : Like Community Category wait long enough now the page load triggers is reporting an error.

d. Turned off (button) Object "Dig It for SS" and "Dig It for Diggers MAPP", button works (shouldn't), sometimes error code, sometimes times posting but oddly from  Dig It On Page Load : Like Community Category wait long enough now the page load triggers is reporting an error.

Why the button's working, then not, but always posting through the wrong action/object relation is beyond me.

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

Well, whittled it down.  I think.
I can use the button/link in this situation:

My "upon page load'' action/object set is triggered by a click on the button within an html module using the javascript (0) code filled with full url.  Appears to consistently work right now.

Action is custom, set to 'upon page load'
Object is a content-article, object type article

I guess if I set the page load to a high number then that would work. 

You mentioned above that there is a way to set that html module code to trigger on whatever page it is on.  What is that code?

Sorry, for the length of this thread.  Just trying to figure it out.

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

Okay, I'm starting to annoy my own self and fear confusing anyone who may read this thread.  Feel free to delete any of my posts to avoid confusing others.  I think I found another combination that appears to work more descriptively for manual triggers and will only assume the fatal error codes earlier were operator error on my part with a misconfiguration.

Manual Trigger of link:
My custom 'digs' action set to a very long page load timer also works with a custom object that is Extension:custom, Layout:custom, Object Type: article, Built-in Facebook object checked with the URL query parameters.  This works only if I turn off the Content-Article object that was set to the category where this particular page resides.  Prior, I had that Content-Article object turned on at the same time and that was apparently conflicting with the Custom-Custom Article object.

Again, feel free to edit/delete this post to avoid confusing others.
Thanks.

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

Still if you do have any tips on the javascript code for the html module that can trigger whatever page it is on that would be a great help.  As it is, I'm looking at making a module for each page and that will be a chore.

Thanks again.

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

Lisa,
No problem for the messages. We don't delete messages unless requested to. The point of a public forum is for others to see issues and the flow of how to get to a solution.

First off, to use the current URL in the script, try changing the Javascript to:

Code:

jfbc.opengraph.triggerAction('234',location.href);

The location.href should use the current URL in the address bar for the action and make your life easier. Again though, if that causes problems, try with a hard-coded URL just so we're testing less stuff at once.

With that, it sounds like you have a Custom Action / Custom Object pair that seems to be working when the content plugin is disabled, is that correct? Are you seeing any other issues.. other than wanting the URL to be dynamic than that (as noted above).

Obviously, I'd love to help you get the Content plugin functioning as well.. but this is where we need to get a known-working configuration and then add more plugins/features as we go. That will make it much, much easier to diagnose what could be going wrong when we add features to the mix.

Keep us posted on anything you find and we'll gladly keep working with you on this!

Thanks,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24140 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

Sorry, forgot to answer that question earlier. Both Open Graph - Content and Content - JFBCContent plugins are Enabled.  Yes, it's a Custom Action / Custom Object pair that's seems to be working.  That locatioin.href is going to make my life easier considering there needs to be an object created for each page.  Thanks so very much.  You've given me hope!  LOL current/smile

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

Wasn't trying to withhold that nugget from you about the location.href, I just didn't want to get things too confused when there were still issues.

Keep us posted on how it goes, and hope you're not too frustrated. It seems like the light at the end of this tunnel is right up ahead current/smile

Thanks,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24140 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

That code works!! current/smile

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

Awesome! Very glad to hear that got you going.

So, just to make sure.. where are we at? It sounds like things are working pretty well for you now. With the thread above, it sounds good, but I just want to make sure I'm not missing anything.

Either way, definitely making good progress and I hope you're happy with things.. even if it may have been a bit more difficult than you anticipated. We do appreciate the feedback and hope you're happy with your choice of JFBConnect.

Thanks,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24140 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Custom Open Graph Action : Manual vs. On Page Load

We are almost there!  One question from above, the ''activity log'' with no option to delete.  I'll attach another screen shot.  Second, since there's no article ID is there anyway to connect a custom object to the front page? 

Thanks so very much for your patience with my learning curve.  I don't mind the hard work of learning.  This is worth it.

This extension is going to be an integral part of our new website as it's further developed.  In 2011 our business won the Facebook American Express Big Break for Small Business.   One of my goals if we won the Big Break was to revamp the website, create a plant database and make the site an online social gathering spot and a place to share gardening information.  Before I even knew what open graph was I thought it would be cool if there were a way for our customers to 'tag' plants on our site that they liked for future reference.  I totally see open graph getting part of that done.  Figured once I learn the ropes and we get our feet wet with our 'Dig it' button that I'll further create other buttons to aggregate, let's say, container garden recipes, plant for the shade, etc. 

Alex, your extension is making it possible for us to do that and make real one of our Big Break goals.  I was really hoping I could get this part going by mid April because we have a special event coming up that involves Facebook and I so wanted to have this site ready and as socially tricked out as I could muster.  So thank you, thank you, thank you.  Your hard work on this awesome extension is making that possible for our business.

Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests also viewing this topic
There are 0 users also viewing this topic

Board Info

Board Stats
 
Total Topics:
11684
Total Polls:
0
Total Posts:
49047
Posts today:
3
User Info
 
Total Users:
47816
Newest User:
[email protected]
Members Online:
0
Guests Online:
917

Online: 
There are no members online
Social Stream
SourceCoast Joomla Social Extensions
Friday, 25 May 2018
JFBConnect 8.0 Coming Soon! Stay tuned.
Refer and Earn

Like our extensions? You're not alone! That's why they're used on tens of thousands of websites. Now you can earn 20% of any sale you refer to SourceCoast.com.

We provide excellent documentation, well laid out sales pages and great support. All you need to do is spread the word and we'll take care of the rest.

Learn About Our Affiliate Program