How to "give users the ability to turn sharing off/on globally" - facebook

I sent an application for review at Facebook and received the following response
Status: Changes needed
Unfortunately, your article.read built-in submission does not meet the read requirements specified at: https://developers.facebook.com/docs/opengraph/actions/builtin/#read. You must give users the ability to turn sharing off/on globally as well as remove an article that was shared within the app. In addition, read actions should only be generated when there is a strong indication that the user is actually reading the article. Please re-submit when these features have been added to your site. We appreciate your patience. Note: If you are creating an aggregation based on the object, you need to add 6-7 unique sample objects, and then create a corresponding sample action acting on each of these unique objects. (You can not just create 6-7 sample actions pointing to the same sample object). Submission Checklist: https://developers.facebook.com/docs/opengraph/checklist
Please make changes below and resubmit for review.
But I don't know how to "give users the ability to turn sharing off/on globally".

The way I did it for my open graph action is to have a setting in a profile where they can toggle it off and on. If the toggle is off, I do an IF statement to not display the code that sends the Action. Then obviously I display that code if the toggle is set to on.
Without knowing more information on your system or all that, I can't really give more specifics on how to actually do it...

Related

API to access Google Doc "Email Notification settings"

We have hundreds of business documents, and when a user makes a suggested edit or comment it's the manager's responsibility to review and approve/reject.
Google offers a feature to receive an email notification when a comment is made or suggested edit made(otherwise easy for managers to loose track or not know about suggested edits/comments), and we'd like to turn this on for managers but manually doing this for hundreds of documents is a maintenance nightmare. Is there an API that would allow us programmatically set this field, or even read it.
If there are no APIs is there some other recommended work flow such that employees can suggest improvements and managers will be proactively notified so they can approve/reject the suggestion(ISO 9001 Control of Documents/Records)?
PS I wrote some scripts to poll documents for open comments/suggestion, but we'd prefer to be proactively notified.
You could create a program to watch changes in files by using the SuggestionsViewMode. You need to fetch the entire document content and then look through it for suggestions.
result = service.documents().get(documentId=DOCUMENT_ID, suggestion_mode=SUGGEST_MODE).execute()
I assume by the previous response that there is not a way to change notification settings for a doc via API?
I actually have sort of the opposite problem of the OP, where I am generating lots of documents for a shared drive via automations. These docs are used by our team, but aren't generally relevant to me. Because my account is the one generating the docs, the notification setting defaults to "All comments and tasks".
It would be great if I could update my automation to change the notification setting to "Comments and tasks for you" after creating the doc. I'd appreciate any suggestions.

Password login for ios app

I am currently developing an app for a company that is in a very competitive field. I have finished all of the features of the app that they requested except for one, making it somehow protected from their competing companies to download and use. I thought that I could set up a UIViewController with a password field that would check against some kind of database, but I'm not sure how to do the checking against a database part nor the practicality of it, and was hoping I could get some ideas on how to do this so that other companies couldn't steal and use this app without a password or something that changes like every 30 days or something and is kind of like an activation code.
Review the WWDC 2012 video "Building and Distributing Custom B2B Apps for iOS". I'm unsure if your app is in this B2B classification, it seems that it might be from your description.
What I ended up doing (if everyone needs a reference) was setting up a server with an SQL table that has pass codes in it. Since apple does not allow for any sort of system that requires you to "buy the app from outside the app store" I made a dumby username field (shame on me) that takes any value you like and then requires to have a pass code that fits. Once the pass code gets authenticated with the web server in a json sql request (there are plenty of api's to do this with) it comes back and sends the user to the first screen and sets a value in a plist with how many days of use the user has left. Whenever the user opens up the app it checks to see if the date is different from the last date logged in (saved in the same plist file) and if it is different then it calculates the difference and deducts that many. When the count reaches 0 it sends the user to the pass code authentication screen again. A bit complicated but an effective method of getting around Apple's restriction on not having a sort of pass code system like this. Thanks for the answers, unfortunately enterprise did not work for this company since they needed to be able to distribute the app to as many 3rd party members as they wanted to without having to worry about them leaving the company for other suppliers and remote management of the app (I.e ability to remote uninstall) was also not an option. Hope this helps someone someday!

How do I see the aggregates of my published "news.reads" actions?

I have a Facebook application that wants to publish document reads to a user's OpenGraph.
Since read is a reserved, built-in action, my objects have to have the type article. The publishing of reads to the user's graph works fine and the last read is also shown on the user's timeline.
Additionally, I have set up some aggregators that would show the last 5 reads, the most popular authors etc. The problem is that I can not find those aggregators anywhere in my timeline/profile or in the App section of my user.
Is it not possible to control/show the aggregators for built-in actions and objects?
I have a feeling it should be, since I can set them up and (for example) Spotifiy also uses the built-in music.song objects, as shown below - this is basically, what I also want.
All I am seeing on my app's timeline section, though, is this:
I believe you are not in control of when facebook displays your aggregations as you have defined them in your open graph settings, since facebook uses the so called 'GraphRank' to determine whether to show your aggregation or not. The calculation goes like this:
GraphRank = affinity * weight * interactions * time
affinity (score): this is the relationship between the viewing user and the creator of the action.
weight: if two users interact frequently with each other, the respective actions in the open graph are rated higher than for users who do not have the same interest and are not in close contact on Facebook.
interactions: how often does the user interact with the application and how do friends react to the activities in the social channels (if nobody clicks on the published actions it's bad for the GraphRank).
time: if an app is used irregularly or only once, actions will receive less attention in the long run and will be presented less prominently on the timeline.
See this article: http://www.insidefacebook.com/2011/12/27/edgerank-and-graph-rank-defined/
This is not the perfect answer to the actual question but I was able to solve the problem nevertheless. In case someone else is in the same spot, you might profit from my learnings:
The application I'm building wants to push read actions to a user's OpenGraph. My aggregation problem was that my reads from the built-in news.reads action did not get aggregated. To this day, I do not know why not.
Instead, I managed to create my own read action. It is not connected to the built-in one and exists in my own namespace.
This action can now be connected to my own objects as well and is not bound to the article object – as is the built-in one.
Having my own actions and objects, it was a breeze to follow the instructions for aggregations and create as many aggregations as I like. They also actually show up in my test users' profiles. Yeah.

Way to expose appstore IDs but keep them secured for release

I am working on an application that will allow the user to purchase content from the app store
https://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008267-CH1-SW1
These products require a "ProductID" that ties them to whatever is in the appstore.
I will need to store these IDs somewhere in the application so I know what to send the server when the purchase button is clicked.
I wish to expose these ID's and allow non-programmers to enter any ID they want in both our side and the server side, and not have to call on a programmer to go into the code and change some enum.
I figured a config file would not be very secure, for in the end it's just a text file that a user could potentially view after purchasing the app. May not be a huge problem if a user saw the ID, but I don't like the idea of anybody seeing the innards that go through a payment process
Assuming im making sense here, whats a good way to expose these IDs but still keep them secure so users may not find them?
Also curious, how secure is something like an enum in c++? Can people break the .exe down and see the code and its values?
For your final question, yes and no. If they have access to the debugging information (a PDB in Microsoft land) then yes. But armed with just an exe and disassembler, you will see only the constant values that are assigned to the enum members.

Copying data from Field Test Mode

I'd like to copy out some data from the iPhone field test mode. Is there any way to do it? I'm using the data for testing, so it's not necessary to require App Store approval.
Since the field test mode is a built-in application that gathers information on the phone and its network, you can't really do anything to interact with it.
The information that the application gathers is likely taken from the private API. If there's specific information you're tying to get, I would ask a more specific question here on stackoverflow about it.