Is it possible to mark the message thread with 'unseen=0'? - api

I work on Google Chrome extension for facebook.
I have a button and if you click on it, a popup with latest active threads appears. I want to say to facebook server that no threads are 'unseen' afterwards. So that the messages jewel on Facebook main page will show no notifications.
Can I do this with Graph API? POST calls to graph.facebook.com/thread_id with unseen=0 don't work.
Alternatives?

You do not have write access to the inbox. Only read access read_mailbox. Sorry, but that's the only permission that Facebook currently has available. See: https://developers.facebook.com/docs/reference/api/permissions/
However, you can keep track of the inbox items on a remote server's data store and have your plugin query that to know what's been "seen". So at least from your plugin's perspective, things are showing up correctly.

Related

PWA Notification

I've added notifications to my PWA app and i'm facing a question I can't find an answer. Is there a way to hide the source of the notification? (the line between the title and the body, saying where the notification came from)? Thanks!
Browser vendors don't let developers remove site information from notifications for security and auditing purposes. They want to ensure that if a bad site is abusing notifications, users can easily identify the site and block them.

Tracking Interactive PDF Clicks

I came across a curious question today, asked by my boss. Is it possible to track the clicks to pages inside an interactive PDF without it being embedded in a web page?
The client wants the user to download a PDF from his/her website and track what pages the user is clicking on inside the downloaded PDF.
After searching around on google for a while all I kept getting was links to pages telling you how to track PDF downloads.
Anyone who can shed some light on this or offer me a definitive yes or no to this question would be greatly appreciated.
The Javascript for Acrobat API Reference makes note of this event (page 368 of the API reference):
Page/Open
4.05
This event occurs whenever a new page is viewed by the user and after page
drawing for the page has occurred.
The target for this event is the Doc.
This event does not listen to the rc return code.
This would imply to me that you can hook this event and (assuming the end user permits the communication) send info to your web server every time they change pages.
Obviously this is limited to when the user is reading in Acrobat (Reader or Professional); it will not work if they are reading directly in Chrome or Firefox. And to re-emphasize, Acrobat will prompt the user to ask if it is allowed to communicate with an external website. If the user denies it, no tracking.
As it has already been stated, the PageOpen event would be the hook for tracking pages. But as this works only for (Acrobat) JavaScript enabled viewers, which at that moment have an internet connection available, those stats would be suboptimal.
We also have to point out that this kind of tracking is highly questionable from the point of view privacy (in Europe, this may even be illegal).
A little bit less questionable could be to chop up the document into single pages, add navigation links, and then use the server stats.

way to alert me the developer of an error in my iPhone app

I have this iPhone that loads a different part of a website based on what button you click. AKA it links to a sport website and the first page contains all the sports the site offers as buttons. I have code to check if the website is valid/up and if it’s not to display an error message. Is there a way in the code to like alert me somehow, like an email maybe, of such an error such as an invalid url? Like for example if the website removes a sport w/o my knowledge and a user goes to open the link and receives that error, can the app send an email to me (not from the users account, but like a background account maybe) that can alert me of such an error. Or maybe somehow have me access then NSLog of an error that i give?
There is something called TestFlight App that I use to log errors like that. You can read up on it here
http://help.testflightapp.com/customer/portal/articles/829571-does-the-sdk-support-production-builds-
Hope it helps!
You could create a Parse integrated app.
Alternatively, if you have access to a web server you could create a simple script that you could POST to in the app to let you know of any problems.
Since the user has connectivity on the internet, try creating a web service and use POST with some meaningful data.
If you don't develop server side as well find a web server that offers such a service.

Play framework, limit an action to be done once

I have a button follow on my website, you can toggle it on or off as much as you want.
Each time it sends a notification mail to the followed people. I don't want him to be spammed.
So I want Play Framework not to send this mail twice (twice in a day, for example)
Is there any built-in mechanism or any library of play framework to do it?
Thanks !
EDIT :
Preferably an external service, like Mailjet or mailchimp.
Just save notification to DB instead of sending it immediately - so user can decide how often he want's to get it.
Next use Akka scheduler for sending many notifications in single emails from time to time.

Get Notified when a file changes on dropbox

Does dropbox have a way of notifying when a file changes i.e arrival of new uploads or a file has changed.
Though you will still have to poll, there's a relatively new API endpoint called /delta that will let you poll much more efficiently than the /metadata endpoint.
It's better than using the RSS feed.
As Kannan points out, there's a new API endpoint called /delta that's better than polling or RSS.
This can also be used in conjunction with the /longpoll_delta API endpoint :
A long-poll endpoint to wait for changes on an account. In conjunction
with /delta, this call gives you a low-latency way to monitor an account
for file changes.
This delta API can be called to get sync
http://forums.dropbox.com/topic.php?id=53533
Dropbox now officially offers Webhooks https://www.dropbox.com/developers/blog/90/announcing-dropbox-webhooks
Dropbox recently announced WebHooks!
If you're interested in helping us out, just click through to fill out
your information, and we'll be in touch:
Happy Dropboxing!
Though Dropbox's delta API is used to get a list of all the modified file details, a webhook is what one needs to get notified about a change (change being modification, addition or deletion of a file)
Go to: Dropbox Developer App Console
Click on your App that contains the files whose changes you want to be notified.
Scroll down to "WEBHOOK"
Paste the link that will handle the notifications via POST method.
Click ENABLE.
Moment you click enable, the dropbox sends a request to the link you entered to see if it responds to the GET request or not. You need to make sure that the link does respond to it. If working with Python and Flask frame work, following two lines of code is sufficient:
#app.route('/webhook', methods=['GET'])
def verify():
'''Respond to the webhook verification (GET request) by echoing back the challenge parameter.'''
return request.args.get('challenge')
Now you will be notified via POST to the above link every time a change is made to dropbox.
Deal with the notifications the way you want to. :)
If you have a computer with Dropbox installed that is always on, you can set a script to run whenever Dropbox pops up a change notification. That script could then grab the change log using RSS (or the /delta API) and if the file/directory you're interested has changed, send a notification.
On Mac, Dropbox can send notifications to Growl and you can tell Growl to run your script. On Windows you will need to monitor for Notifications in the system tray using something like gTraySpy. Growl for Windows can do this if you install the Windows Balloons plugin.
As long as you can get a script to run when a change has occurred, it's just a matter of parsing the change log and performing an action when certain item(s) have changed.
Dropbox has a new long polling endpoint for deltas:
https://www.dropbox.com/developers/blog/63/low-latency-notification-of-dropbox-file-changes
Dropbox SYNC API is the way to go
DBPath *path = [DBPath root];
[fileSystem addObserver:self forPathAndChildren:path block:^() {
NSLog(#"something changed in your dropbox folder!");
}];