Is it possible to have a 'background' Facebook App? - java

I need a Facebook application that kind of sit in the 'background' of user operations. Once the app is installed by the user, it will keep on sending the user's status updates, new friend connections etc to another web app of mine. It will keep on getting info no matter whether the app page is open or not.
My question is -- is this possible? So far, I've played around a simple iFrame app written with the Java API. It seems that it can only perform data collections whenever the page is hit.
EDIT: Privacy is definitely a valid concern here. But the application will definitely prompt for permission even if FB API is not built in to do so.

You can ask the user for the offline_access extended permission by using the fb:prompt-permission FBML tag: <fb:prompt-permission perms="offline_access">Can I have access to your data all the time?</fb:prompt-permission>, store the user's session key in your database and then query the Facebook API as needed. (You may need other extended permissions if there's other data you want to access that isn't a standard API call.)
Note that this isn't against the terms of service, but you won't be allowed to store any of the data you receive for more than 24 hours.

Tho I wont suggest it, but if you create an "app" which has an associated user account, which you then ask the user of the facebook app to add as a friend, then you can achieve what you want in the question.
e.g., lets say your app was iFacebook - then you create a regular user account called iFacebook Friend, and ask users of your iFacebook app to add iFacebook Friend to their friends(*) list. Then you can scrape data off your app users via the regular facebook account 'iFacebook Friend'.
However, doing so is probably going to violate some usage policies of facebook, and can likely to get you banned, or reported as a privacy violating app. However, if what your app does is useful enough, some people will happily let privacy go...
(*) you can entice them into doing this by giving incentives, such as bonus points, extra exclusive 'stuff' that only those who have added the friend would get.

Nope. Facebook doesn't want apps having too much user data in general, and certainly doesn't want them accessing it when the user is not actively interacting with the application.
Heck, infinite session keys aren't even supported anymore. Those still around have all been grandfathered in.

Related

Android demo or trial app

im creating an Android app and i want to put it on Google Play. I want the users to download it, use and test it for about 7 days and then, the app will be blocked and the user has to buy it to continue using it.
I've tried with Backup Manager but it didnt work.
Then i read about Licensing (i have a good tutorial already) but i dont know if its what i need.
Other option is to make a subscrition payment to use, but with a free trial, however this is a bad option because the user has to put the payment method and data to use the app.
What do you think guys? can i use Licensing for what i need or better other tecnology?
EDIT:
Maybe i didnt explain myself very good, i want to know if with the Licensing system i can do a trial version of an app for like 7 days. I've tried the other solutions and didnt work for me (Backup Manager, SharedPreferences...) and want to know if Licensing can help me or if its another technology i can use.
There is no direct solutions for what you want.
Google provides a Subscriptions trial with their Subscriptions library, but then the users should pay "regularly" for the content of your app. (weekly, monthly or yearly etc..)
The best option for your use case in my opinion should be this:
You setup your app as FREE on the store
When the user download the app the first time, you create some sort of key which identify your installation on that device
After trial period ends, you can block the app usage until the user purchase an In-App item which re-enable the app functionality.
This is some sort of FREE/PRO version logic which a lot of developers already use in the store.

How do I know if a user has my app installed and opened?

I wish to promote my app. If a user downloads an app, I would like to know if this is downloaded and opened.
How would you go around doing this?
The question is: how would I know if the user does install my app and open it?
I assume that the key part of "downloaded and opened" is the "and opened" part, correct?
You could just have your activity check some database value (for example) to see if this is the first time that the user opened the app. If so, you could just call a Web Service.
You could actually do that to keep usage statistics in general; you'd probably want to have some kind of explicit opt-in from the user first, though.
Android also has a package for capturing usage statistics.

Android how to let users interact with each other

Been doing basic Android development for awhile now. Ready to implement some ideas previously I was to unsure to touch on.
If this question has already been asked please feel free to direct me there as I can not find a thread.
Lets say based on user interaction some data is collected and entered to either a text or XML file. How can I enable this user to send this data thats been collected to another Android user using the same app? Are there any APIs out there capable of transferring data between users?
In a simple example, Facebook Messaging. One message is created by a user and sent to another user. How can I get on the right path to this?
Thank you!

Is there a way to generate tweets during application development?

I'm developing a web site that's going need to generate tweets. I have a twitter account, but don't want to post tweets to that account until the site is live, or a least, in beta. I tried creating a second account just for the purpose of posting during the development process, but twitter wants a mobile phone # that's different from the first account, so this approach wouldn't work unless I had a second phone.
Is there a standard way to make sure all the pieces are working together without posting test messages to the web site's main account during development?
EDIT:
To post tweets with the twitter API, you have to go to the app permissions page and switch to "Read and write." When you do this, it shows the error:
Error
You must add your mobile phone to your Twitter profile before granting your application write capabilities.
Please read https://support.twitter.com/articles/110250-adding-your-mobile-number-to-your-account-via-web for
more information
My mobile phone is already registered with the production account. To register it for the dev account, I'd have to de-register it for the main account. I'm trying to avoid that. I need to have both active so that both accounts can be used at the same time.
Unfortunately with Twitters mobile side phones to numbers are a one to one relationship. You will have to resort to getting a different phone number luckily there are some good options out there.
Get a Skype phone number. Its about 5$ per month but would probably be the easiest and cheapest solution.
If your like me and dont like lingering monthly bills attached to your credit card then you can go to almost any local gas station or store and buy a cheap phone and pay as you go plan. This will give you limited capabilities with this phone (no internet access unless you pay). But on the up side you would have a physical phone and number and no monthly bill to accidentally forget about for 3 years before you remember about it. I bought one a year or 2 ago after I dropped my phone in a river for a one time fee of about $40.
Have you tried just to use an irregular phonenumber? For example 00000000. Twitter might not accept it, but it's atleast worth a try.

Android Intent Security

I've been working on designing a few Android apps lately, and one of my next experimental adventures is the first to listen to an external Intent: Google Voice. I was wondering about the potential for a malicious user to create another Intent mostly identical to a pre-existing trusted Intent to inject evil code into my app.
Since intents isolate activities from each other (unless you root or there's an as-yet-undiscovered and fairly fundamental defect), they can't inject code into each other. However, any activity you start may of course do whatever is permitted to it according to its manifest.
The primary security countermeasure against malicious apps, whether they communicate by intents or otherwise, is the manifest and user approval at installation. If the user installs an app that processes RecognizerIntent, that app will be presented as an option to the end user when you attempt to get speech recognition. If the end user selects it, it will be executed. The most it can do with your app is to post results back to your Activity through your onActivityResult. You have to decide how much to trust that data (e.g., you may want to ask the user for verification before sending a possibly embarrassing email).
Any security threat model has to take into account what assets you protect, whom and what you trust, and the outside interaction and attack points. When it comes to speech recognition, the worst that can happen under the Android security model is that an external app does its worst on its own (using your app just as a trigger), or that it posts bad speech recognition results back.

Categories