Is is possible to get notifications when user submits data in ShinyApp? - r

Pretty self-explanatory, I am hoping to expand my app to push notifications when users upload new data.
Currently, the data is pushed to the server once user clicks a ‘submit’ btn. However, I have to go in the corresponding file to see if new uploads have been made.
I am thinking that I can add another observer (observeEvent) to the actionButton (submit) but the closest I can get is combining html to ‘sendmail’ to the admin account. This is obviously not automated and is little better than the user emailing admin themselves.
Does anyone have suggestions?

Related

Flutter/Dart/Firebase - Reduce unnecessary data loading

I tried searching my specific problem but I could not find any suitable solution.
I would like to thank everybody in advance for your help.
I am currently developing an iOS app.
The App represents a user profile which can be updated by the user.
Everything from the authentication, registration and the possibility to update your user data works fine with the help of Firebase. Now I would like to optimize some code.
So the application has 2 Screens, HomeScreen and EditScreen.
(Besides the Screens needed for registration and login).
To keep my question short:
How can I reduce the amount of data which is loaded from firebase?
Example:
1. User is on the HomeScreen, to build the view his image loads from Firebase Storage
2. He wants to edit his Image and therefore switches to the Editscreen, where his image will be loaded again
3. After changing his image, the new image will be uploaded to Firebase Storage and he can see his new image on the Editscreen
4. If he now switches back to the HomeScreen his new image will be loaded again from Firebase
Is there a good way to reduce the amount of loading?
Like caching the image between step 1 and 2?
As there is always a little delay in displaying his image.
Thanks!
Sadly I am not allowed to share any code.
You can check out the flutter_advanced_networkimage package. It will cache your photo upon load. For everything else, you should just move your profile object (or whatever it is that calls for the firebase user's information) above those routes and pass it down through your widget tree through arguments or state management.

How to maintain session in different tabs of same browser?

My website is used to administer customer accounts. If I access CustomerA's account through the website then open a new tab and access CustomerB's account the session holding the customer ID updates to think I'm now working on CustomerB. Then if I click back to CustomerA's tab and start editing that page I am in fact editing the database record for CustomerB. This has happened and caused all sorts of problems so I need to find a fool proof way of stopping it. I don't want to put the customer ID in the URL as this will make it open to abuse.
Session is not a place to hold information like this exactly because of problems you're describing. You need to pass customer ID along with the page itself (either in hidden field or in url), so when you post back the form, it exactly knows what are you trying to do. Session won't protect you nor add any extra security. You need to determine if the user has correct permissions either way, so you should focus on this aspect.

App does not post to user's timeline

I have developed an app using Facebook Graph API and Open Graph. I want my app to display custom data, when the user performs an action on my website. I read about open graph and added a open graph tags, etc. I have used the following code
$post_url = "https://graph.facebook.com/me/myappnamespace:mycustomaction?method=post".
"&mycustomobject=mywebpage".
"&access_token=".$_SESSION['access_token'];
Right now, whenever a user uses this app, it appears in his activity. But, it is not shared on his timeline. What permissions do i need to ask the user to be able to post to his own timeline? Currently, I am asking for publish_actions and publish_stream
What am I missing? I followed the exact steps in the tutorial, but am not able to post to the timeline using opengraph.
You no need to add any permissions except publish_actions and publish_stream. But you should add a new tag like fb:explicitly_shared. Set this as BOOL value. If you set true, it will show in the user's timeline, else it will not.

How to make a box with user options in facebook open graph

I have an online magazine with news articles and i want to make an open graph action that everytime a user reads an article a story to post in his timeline.
I have all the nececery open graph tags in my urls and a login button with publish_actions scope.
I'm one step away from submitting the action for approval but i still cant figure out one thing.
The facebook's documentation says that i need to give users an option to stop auto publishing or remove the app etc. something like the image in the middle of this page http://developers.facebook.com/docs/opengraph/actions/builtin/#read .
I saw it also on yahoo and its exacly the same.
How can i make something like this in my site? The code is ready somewhere or i have to write it myself?
Thanks in advance!
The permission remove, or just a switch to stop publish of action and the delete article functions will have to be developed by you.
I am working on the same things for my app.
creating user CP control panel containing, revoke perms buttons.
a user CP to swich publishing on and off, via true/false in mysql
an array of app activities with delete buttons.

Google Analytics Goals - How to know if user is using multiple browser tabs/windows?

I've set up a goal for the signup process on my site, and I can see that users exit the Goal funnel at a page with nothing but a input and a next button, landing on another page on my site.
I'm guessing this is when users create fake profiles in one tab, while having another tab open somewhere else.
Does anyone have any ideas on how to deal with this? I'm not even sure what's best practice here, here's a few ideas:
Force the user to finish these steps as long as he is signed in for the first time and havent completed them, but that would be a development issue.
Setting cookies in the signup steps, and (if first time signed in) add a check globally on the site that redirects the user to the last step.
Other suggestions?
Even if a user has multiple tabs open to GA the requests are serialized and they all look like one browsing session. I do not believe you can check for this with GA at all.

Resources