Apple App guidelines - is a GET and POST request a private API? - iphone

My IOS app transfers data to/from my web server using GET and POST queries. Are these 'third party API's or private APIs, and disallowed? I am a beginner, and would like clarification on these definitions? My app purpose is to submit site user's votes to a website, so I am using a POST query to post the data to my server, and a GET query to confirm the user's login is valid.

Related

Connect App Flutter with API instagrame Publish comment

I have a question about connecting my app, made with Flutter, with the Instagram API.
I want the user to register with their account, store the access token and then send a post to the API to publish a comment or add a like.
Can I do this with Flutter or do I need to use a different language like Python?
I checked the API documentation that Instagram provides and it seems that you can only do read-only requests (liking a post might not be possible).
The API you mentioned in your tags will not work with personal accounts, as Instagram states:
The API cannot access Instagram consumer accounts (i.e., non-Business or non-Creator Instagram accounts). If you are building an app for consumer users, use the Instagram Basic Display API instead.
You can try to use the mentioned Basic Display API instead, but mind you won't be able to author any posts or do actions in behalf of the user. To circumvent this, you might have to reverse-engineer the frontend facing portion of Instagram but I won't go into that.
To come back to your question, Flutter is well able to send network requests as mentioned here, but you still have a long way until you have functioning access to Instagram (check the Getting Started).

Can memers of the public post to my business page via the Graph API

I want members of the public to submit posts (images and text) to my business facebook page via an iphone app using the Graph API. Is this possible? If so, could someone explain which calls need to be used in the iphone App (using the Graph API).
I can only see that people with permissions set for the business page can post to it.
I am the developer of the iphone app and it is for public use. I want people to be able to post their game results to the my business facebook page (as well as their own facebook page)
Any advice appreciated.
You will need to request the publish_actions permission from your users and with their access token, you can make POST requests to the Graph API at this endpoint:
/{page-id}/feed
In this POST request you can include a message/link/etc...
For more reference and other accepted parameters, you can take a look at the relevant documentation here: https://developers.facebook.com/docs/graph-api/reference/v2.1/page/feed#publish

How to simulate silent login to Facebook Graph API?

I'm working on an API that will aggregate data from several website, including facebook. The API has an engine that harvests data on regular intervals, and then the client app polls the API to get the data from all websites centrally.
The problem is that the API has no way of authenticating on the regular, behind-the-scenes harvests, as Facebook insists that the user has to click on the OAuth Dialog. With the short story being that there is no way to login to graph API silently this almost means that developing such an API is not possible (except for harvesting only public data).
However, I'm not easily satisfied by "it's not possible" answers and my clients - even less so. Accessing private information on demmand is defnitely possible as Facebook apps do that. For example, the official Twitter app posts on my wall whenever I tweet. I guess apps only need a permission once and then can access the user's profile as much as they like.
So this leads me to think that I should do a combination of a Graph API client and an application that talk to each other, and whenever the API needs to harvest - it asks the app to get the data and fetch it to the API. Or maybe it should be a push model (the app sends the data whenever it's generated) rather than pull (the API requests the data at regular intervals).
Am I on the right track? Is any of these the correct design approach?
I did some searching but it's very hard to find any useful discussion on the topic as whatever keywords I try I only find "Can I login silently? No" type of discussions.
You'll want to look into the offline_access permission. This lets you access a user's data when they don't have an active session, or are offline. That's as close to "silent login" as you can get.

How to architect and design Facebook friends integration into a iPhone app with cloud service

For some reason I can't find this information anywhere. I'm looking to figure out best practices for how to design and architect Facebook integration into an iPhone app that also has a cloud service backing it for my own (non-facebook) data.
Specifically, assume a user is going to authorize Facebook access in my iPhone app and I want to find "your Facebook friends that are also using this app+service".
The Facebook authentication and authorization with iOS SDK is straightforward, and it looks obvious that my service needs to store the user's Facebook User ID. However, I am trying to get clarity on:
Who does the friend lookup against Facebook's server? iPhone client or my service?
Does my service cache anything about the relationship between the friends or is it looked up each time?
I'm ultimately trying to figure out how to get a design that will scale to millions of users and see problems in whether client or the server does the work. If it's the client, then user has to wait for a call to FB OpenGraph, then back to my cloud service to get the intersection of FB friends using my service (+ any other metadata I want to show).
If it's my server, I'm caching information that ultimately has to be sync'd and reconciled with changes to the user's friends list. Also, this doesn't really solve the scale problem since the iPhone app would sign into FB for a given user, send me their Facebook ID, then my service would have to call Facebook OpenGraph server-to-server and still reconcile the FB friends list.
Would love any advice!

Outside access to Facebook events

Let's say I own/control a Facebook page where events are posted. I'd like to display these events on another website (In my case, a WordPress blog, but that's not the important part) on an "Upcoming events" page.
What I'm unsure about is: Is the Facebook API usable "externally" like this? I've downloaded the PHP library and have a demo app running that works from within Facebook (i.e. emitting FBML that facebook.com interprets and displays to the logged-in user), but in my case I want a third party (my web server) to query Facebook every so often, rather than the site visitors directly requesting data (HTML/JSON/etc.) from Facebook itself.
Is this sort of thing possible with the Facebook API? How will my web server authenticate itself? What information do I have to store?
Note: I'm looking for information more at a "sequence diagram" conceptual level, not just asking for code. That part I can figure out myself. ;) Unfortunately, Google and the FB developer wiki have not been entirely forthcoming. What do I need to know so I can start coding?
This is a basic overview of how I've done it for a few of my clients who wanted similar functionality:
Create a pretty basic app that prompts for Extended permissions, specifically "offline_access" and whatever else you need
Store the resulting Session Key in your database with the UID
Create a secure, authenticated webservice for your app which allows you to get the info you need for a UID that you supply, using the session that you've stored in your database
On the website make requests to your app's webservice, being sure to cache the results for a certain period of time and only make a new request to your webservice once the cache has expired (I use 5-10 minutes for most of mine)
So basically your Facebook app acts sort of like a proxy between the website and the user, doing all of the authenticating and requesting using legitimate means.
I've used a webservice because I only wanted to maintain one Facebook app for multiple client's needs. It works like this (in a not-very-awesome ASCII art diagram):
Facebook User 1 \ / Client Website 1
Facebook User 2 --- Facebook App --- Client Website 2
Facebook User 3 / \ Client Website 3
Note: I've only done this for users, not pages, so your mileage may vary.
You can do Events.get with the Facebook API then supply the page/profile ID you'd like to get the events for. Depending on how your page is setup you may have to authenticate, simply use your Facebook account, since you should have access to all the events. oh and make sure you do plenty of caching so your not hitting Facebook on every page load.
AFAIK other than user info, you can't fetch any other data from facebook.
But you can try it other way - say create an app that stores events and other relevant information on a webserver and then your other website can easily access that info.