Topic-icon Custom Open Graph Action : Manual vs. On Page Load

Active Subscriptions:

None
Hi Alex,

Have been following this thread on custom actions: www.sourcecoast.com/forums/jfbconnect/jf...ects-with-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?
The topic has been locked.
Support Specialist
11 years 1 month ago #31728 by alzander
That's a long thread :) 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
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago #31731 by lishig
Forgive me. Newbie here. Here's a link. www.diggersdelight.com/index.php/communi...rdays-art-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.

File Attachment:
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago #31734 by lishig
oh geesh, confusing myself.
I used this in the module: ...a href="#" onclick="jfbc.opengraph.triggerAction('234','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.
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago #31735 by lishig
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.
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago #31736 by lishig
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 "#"
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago #31737 by lishig
Second side note. My activities log lost its ability to allow me to delete. Also, formatting at the top is funky.
File Attachment:
The topic has been locked.
Support Specialist
11 years 1 month ago #31745 by alzander
Whew. I'll try to hit everything you asked, but if I missed something, let me know :)
* 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
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago #31749 by lishig
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.
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago #31750 by lishig
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?
The topic has been locked.