Integrating with Google Firebase

1 year 9 months ago #330000 by PaceOnline
Integrating with Google Firebase was created by PaceOnline
We are using Google Firebase to integrate CB with our mobile apps and we use various auto actions to send data to firebase. We have encountered a challenge sending uploaded photo data for groupjive photos to firebase. We are using a Request auto action copied of the Activity system action CB GroupJive Photo - Create. The problem is we can't send the URL of the photo, we send the url as [sitename]/images/comprofiler/[var1_category]/[var1_group]/[var1_image] and this doesn't work. Please can you shed some light on the substitution we can use to get the exact URL of the photo being uploaded.

Please Log in to join the conversation.

1 year 9 months ago #330006 by krileon
Replied by krileon on topic Integrating with Google Firebase
Looks like the path is just slightly incorrect. You're missing 1 folder in the path. Below is the structure.

/images/comprofiler/cbgroupjivephoto/CATEGORY_ID/GROUP_ID/IMAGE

Specifically missing /cbgroupjivephoto in the path. It should work fine with that.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

1 year 9 months ago #330022 by PaceOnline
Replied by PaceOnline on topic Integrating with Google Firebase
Ok I tried that but its still not loading the image we can't get CATEGORY_ID and is there a way we can access the sitename variable or $_SERVER?

Please Log in to join the conversation.

1 year 9 months ago #330026 by krileon
Replied by krileon on topic Integrating with Google Firebase
You can substitute in the live site path using [cb:config param="live_site" /] as noted in our substitution tutorial below.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18353-using-substitutions-throughout-cb

Category id exists in the group object so [var1_category] should work fine. This depends entirely on the trigger you're using. Referrer to the below documentation to see what variables are available to a trigger and their order.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18358-using-cb-triggers


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

1 year 9 months ago #330044 by PaceOnline
Replied by PaceOnline on topic Integrating with Google Firebase
We are using the gj_onAfterCreatePhoto and gj_onAfterUpdatePhoto events like the system action. We can't access the group via var1_category and there is only &this as a variable. Is there another way we can do this? Also is there an event we can use for group activity comments?

Please Log in to join the conversation.

1 year 9 months ago - 1 year 9 months ago #330046 by krileon
Replied by krileon on topic Integrating with Google Firebase
If you're using a Code action and using PHP you can call the group function on the object to get its group. Example as follows.

$group = $variables['var1']->group();

There isn't a way to easily access the category id from substitutions from a photo object. You can try using format functions, but unsure if it will work. To give it a try enable format functions under Parameters then give the below a try.

[cb:parse function="group" class="var1" method="get" get="category" /]

That should call the group function on var1 (photo object) then call the get function on that group and pass category as the first variable to that get function which should return category id.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 1.268 seconds

Facebook Twitter LinkedIn