Page 1 of 1

Social Share and Comment option for nodes

Posted: Mon Apr 09, 2018 6:05 am
by nasirkhan
I want to add social share option for each nodes. I found an option to add Facebook Twitter share buttons, but it only shares the main url not the node specific URL. Is there anyway to to do this?

I also need to add comment/ feedback option on the tour. can anyone please suggest a solution for this? I also want to get the link of the specific node along with the comments. How can i achieve this?

Re: Social Share and Comment option for nodes

Posted: Wed May 16, 2018 1:52 pm
by Hopki
Hi Nasir,
I have had a look into this, there was a time you could add text to the Facebook feed links.
But from what I can see Facebook have stopped parameters on the feed dialog links.
So I can not see how you can do this, I will put a message on our internal message board for the developers to have look.
Regards,
Hopki

Re: Social Share and Comment option for nodes

Posted: Wed May 16, 2018 2:03 pm
by nasirkhan
Thanks for the response.

Along with the facebook/twitter share, i want to add an option to submit feedback.

I want to publish a tour and let the visitors submit their feedback. The comments/ feedback will be node specific and sometimes for overall tour. Please help me add this feature.

Re: Social Share and Comment option for nodes

Posted: Wed May 16, 2018 10:11 pm
by Hopki
Hi,
I would look at a web based database that you can then bring in with an iframe.
Research web based feed back forms.
Example: https://www.w3schools.com/howto/howto_c ... t_form.asp
Regards,
Hopki

Re: Social Share and Comment option for nodes

Posted: Thu May 24, 2018 6:09 am
by nasirkhan
Thanks for sharing your thoughts. I can create a web form in javascript and display via iframe or just simple popup/modal.

The point i am stuck at is, I do not know how to get the node_id of the current node of the tour and i need a button where user will click and the form will appear. Can you please help me to resolve this?

Re: Social Share and Comment option for nodes

Posted: Thu May 24, 2018 10:00 am
by mbb
nasirkhan wrote: Thu May 24, 2018 6:09 am I do not know how to get the node_id of the current node of the tour and i need a button where user will click and the form will appear. Can you please help me to resolve this?
Current nodeID is exposed via the P2VR javascript API-

pano.getCurrentNode()

You can see how this works yourself by creating a "Go to URL" action in P2VR with the following value as the URL-

javascript: alert(pano.getCurrentNode());

Re: Social Share and Comment option for nodes

Posted: Tue Jun 05, 2018 5:55 am
by nasirkhan
@mbb thanks for your reply. It worked. I was not aware about the javascript api of now i found all the related values of the nodes.

I wanted to add a button on the panel controller, beside the zoom and navigation controllers. I added an action as following and it worked. I handled the click by preventing the default from the script.

Code: Select all

Source>Mouse Click, 
Action>Go To URL, 
URL> javascript:void(0). 
I found an another Action on the list, which is "Trigger Click" and i can set different targets. I did not find much details about this, can you please tell me which one is the preferred way to do so?