How to scrape Facebook friends' info INCLUDING their real e-mail the way Facebook App does? - facebook

I recently found that Facebook App (for Android & iOS, but i'm using Android anyway) downloads almost all friends' information (including FB ID and real e-mail account) to a SQLite database called fb.db. I am trying to do the same thing programmaticaly (using python, perl, bash etc) but with no luck so far. I need a way that will do similar requests with FB APP, and will download all of my friends' info upon login, just like the way FB APP work.
I tried so far to:
Decompile com.facebook.katana and see how it's done - No luck (or just missed it).
Sniff the facebook app with burp - No luck (due to SSL and app's protection when certs have been changed)

I am sure you went through this: http://developer.android.com/guide/topics/data/data-storage.html#db
There it is stated:
Android provides full support for SQLite databases. Any databases you create will be accessible by name to any class in the application, but not outside the application.
It was not the answer, it was just a text, which states that you can create a database for your web app. But unfortunately they are not providing any kind of helping material about writing and removing the data from that Database. So lets move to another source!
Related posts:
Please read this:
How to insert data into SQLite database in android?
There is a sweet example of how to add the content to a database in Android.
There is another example on this question too, Downloading data/content into Sqlite database
Why they didn't work:
Decompiling won't work! As they might have editted the app to be only fb-developer-readable on the first place. So you will never have success this way.
And the second thing is same.
All you can do, is to guess the algorithm or ask for it here: http://programmers.stackexchange.com and give it a try from scratch! :)
Suggestions:
I would try to recommend you to first learn how to:
Access Data connection on the phone.
Access the server from where to download the data.
Create a string or what ever data type to be inserted in database.
Create the connection, and save the data there!
I would now assume that you are a beginner, and want a tutorial! Then the first guess could be to visit their own project sites (SQLite, Android). Visit the developer network. And look for what you get!
Good luck buddy! Cheers.

Related

How to download a csv file from Google Drive to show the content in a mobile app

I am totally new in mobile app development and consequently very confused about how to get going (independent from how much I have read Google Drive API documentation over and over again.)
The way I would like to implement my (initially "android") mobile app (which I will develop by using ionic):
I will have a Google Drive account where I will have 1 CSV file. I will periodically renew the content of the file in the background (possibly twice a week).
The mobile app that I will develop will just retrieve the file from Google Drive, process the content and show it to the user in a more readable (easy to understand) format.
My app will not upload any data/file from the user device to the Google Drive. The app will only retrieve a file from Google Drive to show the content to the user.
Question 1) Does this approach make sense? I ideally would like to eliminate the work for back-end development. Or would you suggest another approach to do the same thing (with or without Google Drive)?
Question 2) The authorization process looks quite confusing to me as it is explained in Google's documentation. I could not find relevant information only addressing the scenario I have in my use case. Requirements: The mobile apps can fetch the corresponding file (or the content of it) and process it to show to the end user, but mobile apps (or any other client) may not update/edit/delete the file, cannot add a new file either. The only purpose of using the Google Drive will be to enable the mobile app fetching the data that will be shown to the user. How can this problem be solved by using Google's OAuth framework? A step by step action plan would really be appreciated.
ADDENDUM
You are also welcome to share your view if I should instead consider using Firebase for my problem, which I guess will be more costly.
Based on discussing the requirements with you, I would recommend against trying to do this with Google Drive API.
There are no tutorials out there for Ionic 4 + Google Drive API, and only a few for older versions. It will be an uphill struggle to create a solution that isn't going to scale well.
Instead you should start looking into using Firebase.
There are lots of tutorials which show you the basics: setting up a login system, and reading some data from the database.
The free limits are quite generous.
You can implement caching into your app so that you store a copy of the data on the device, and only refresh it either weekly, or more advanced, put a second table in that records the last updated date for the main table.
Firebase charges by reads so if you can set it up so that you only read one record (last updated) instead of downloading the whole database every time, then you can stretch your free tier a lot further.
If you do outgrow the free tier and the app is not generating enough to cover the costs then you have the option of investing time instead of money. There are guides in the docs about exporting the users and they provide tools so that the passwords can be put into another system without requiring the users to reset their passwords. The database can be similarly exported.

Web app roll out

I've been developing web apps some years now, actually as a hobby. When I write something, unsing Laravel, Sails.js, or Meteor and I add a feature, I upload it and it's there, for everyone.
However, I've always been wondering how bigger sites like facebook manage to roll out features to just some users. Do they push their changes to just some servers? But in that case - how do they manage the make the selected users access just these servers?
Or some db entry to see if the user has access to the feature/ version?
So how does it work?
Really interested in this :)
Large sites like Facebook use a technique called Feature toggles to control the functionality that is active at run-time. The following blog article describes Facebook's approach:
https://abhishek-tiwari.com/post/decoupling-deployment-and-release-feature-toggles

Login Logout authentication and uploading views and pics in our applcation

I want to create an application in which i want a login logout authentication from the database file that can be handled by web services. This application should always need to be connected with the internet and after login i need to upload images and also give there views about the image and i am not getting any idea how start work on that can anyone help me.... I want to use this application some sort similar like facebook.
There is also a problem that which type of application i create native or web or else. Please help me to start this application.....
Try setting up a server that can handle the requests from your app. Your app can then request content or upload content to the server using NSURLRequest. For further reading refer http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/URLLoadingSystem/Concepts/URLOverview.html
I think you are asking the wrong question. What web development language do you know to help you accomplish this? There are many different ways to go, like open source as opposed to paid, which services best handle your specific needs, like Ruby or PHP, which RDBMS to use, etc. If you don't know any programming, then it is going to be a long road. Your first step should be taking what you already know and branching from there, learning what you need to know. In your case, you'll need to learn server side scripting, connect it with a database, how to set up a server to put it all in, as well as client side development like javascript to go with the html.

Sending Data to Website From iPhone

I'm creating an iPhone Game where I want the user to get a unique numeric code when they first launch the app, that way when a friend of that user opens it, he/she can input that code and both users can get rewarded. I haven't encountered any issues regarding that, however what I want to do is make it to where the app registers the code given to every user and saves it to a website of some sort. That way when the other user enters the code, it will load the data from that website and check if it's registered. How would I manage to save the data onto a website? and also What free website could I use for this without having a character limit on the body page?
-Thanks in advance
Your thinking is correct, in that you need to save your data somewhere online, but you don't really "save data onto a website" in the way that you're describing. "Free Website" services usually serve a different purpose entirely - that of serving up public html pages. Sure, they can take the form of a CMS (like wordpress.com or tumblr accounts), but using that as an interface for storing your application's data is not something they're typically designed to do.
For something like this, where you have a public iPhone app that requires secure access to custom strings, you really want to have control over your own web server (different than a domain name, btw), and interface with a database on that server. This will come at a cost, and will involve more code than you're likely to find someone to write for you on here. Sorry to say it, but hey if someone wants to prove me wrong I'd love to see it.
Because all you need to store & retrieve are random strings (basically referral codes... if I'm understanding correctly), your database needs are pretty simple. If you're not familiar with things like PHP / MySQL, and you don't want to learn, it might be worth reaching out to some server-side developers for help. Unless there's more to it than you describe, you can probably find someone to help you for relatively cheap.
Good luck - and I'm sorry there isn't a simpler answer for ya.
You can send data using NSURLConnection. Just create an NSMutableURLRequest and call its -setHTTPMethod: method with “POST” as the HTTP method. Then, set its body and header fields appropriately, and you can use NSURLConnection to send the data.

What is the best way to achieve database synchronization?

I am looking to build software that has an Iphone application as well as a Wordpress based website. Essentially the user will enter data into the iphone app that will then be relayed to the Wordpress site and displayed in various manners.
Whats the best way to get the iphone database and CMS database to communicate?
Thanks
This might go without saying, but generally speaking I would try to keep your client (iPhone) app as 'dumb' as possible; Your Wordpress DB should really own all of the content, and the data stored on the iPhone should be as temporal as possible. To put it another way, your app should be like a WP theme. A theme doesn't really 'know' about the WP database - it's just responsible for displaying it (and occasionally adding to it with things like comment forms).
Anyway, as for the actual communication I would recommend keeping as much in JSON as possible (I've found it easier than XML). There's a great plug-in for Wordpress that can help you out, that exposes WP functionality in a JSON-based API: http://wordpress.org/extend/plugins/json-api/
As for working with JSON on the phone itself, I highly recommend the json-framework: http://code.google.com/p/json-framework/ . In short, it'll convert a JSON string into an NSDictionary in one method. Incredibly useful.
Good luck!
May be it's too obvious, but usually for database communicaton used XML, CSV, JSON etc.