Facebook open graph run story with fitness.course - ios

I am trying to use the Facebook iOS SDK (latest release at time of post) to post a run (fitness) Open Graph story. The Custom Stories tutorial explains how to setup basic story posts in my app (note: I am not using a custom story, I am using Facebook's run story); and I've made it that far.
The point where I'm stuck is with the fitness.course parameter. The course parameter documentation states the following:
A unique course URL is required for each run, bike, walk published for a user.
If I'm reading the documentation correctly, Facebook will not accept an array of location points. Instead, Facebook wants developers to upload course data to their own server and then pass in the URL of the associated course file on the server? Can someone confirm that's correct?
Is there a way to submit course information without hosting it on my own server (as this would be a lot more work than I planned)?

Related

IOS twitter feed tutorial

I am currently building an app where they require all their users to be able to view their feeds only.
I looked at a lot of tutorials online which talk about the new api v1.1 of twitter and now authentication is required at all times.
I see a lot of examples and even successfully followed several of them like
http://www.appcoda.com/ios-programming-101-integrate-twitter-and-facebook-sharing-in-ios-6/
I even saw a tutorial posted on the twitter dev page.Following all of these focused on a few key elements
Using ACAccount to retrieve the account settings of the current user
Using the SLRequest to encapsulate the HTTP request made to the twitter api
Retrieving the data in JSON format, parsing it and presenting it to the user
Well my question is, I do not want user specific feeds. It's like a company updates their twitter regularly, users using the app should get feeds regarding the company. So I was wondering if there was a way, the app provides some default or hard coded authentication information ?
Is there some sort of tutorial, library or anything out there to help me move in the correct direction ?
Thank You for your time and help.
Your going to want to implement the following API call to get that information:
https://dev.twitter.com/docs/api/1.1/get/statuses/user_timeline
Once your application is authorized you can make a call to,
https://dev.twitter.com/docs/api/1.1/get/statuses/MorleyGaelsGAA.json
That should give you the information you're looking for.

Google Drive API for iOS: OAuth2.0 with an application-owned account

I'm creating a simple iPhone app. The basic premise is that the app will display some data (That I provide online) on the application. The data changes over time, so the app has to draw the data from online and display it. I don't have a significant programming background so I don't want to use my own server.
Thus, I thought it would be significantly easier to just put the data into some documents on a Google account and then access them programmatically via the Google Drive API. I could then update the data in my Drive account and it would get updated in the application. The key here is that I am ONLY accessing ONE account that I own MYSELF. The users' accounts are not being accessed. Therefore the goal is to never have to log in manually. It should all happen behind the scenes, aka, it should look like a server, not a google doc.
With this in mind, it doesn't make sense to show the Google Accounts sign-in page to my users as the standard OAuth2.0 tutorial shows here:https://developers.google.com/drive/quickstart-ios#step_1_enable_the_drive_api
I should be able to access my own data by somehow hardcoding in my username, password etc. Google agrees here: https://developers.google.com/drive/service-accounts#use_regular_google_accounts_as_application-owned_accounts
The above link mentions a "refresh token" that I'm supposed to save. However, I have no idea how to build and save that token, or even for that matter, where to find it.
I've gone through both the basic tutorial and the Dr. Edit Tutorial for iOS, but they both assume that the application is accessing USER accounts not application-owned accounts.
I'm not asking for someone to write the code for me (though tidbits are nice), but if you can point me to a step-by-step guide or related sample code that would help me get started that would be awesome. I'll even come back and post the code that I use!
EDIT: Since I realized that the Google Drive API wasn't something I could use for what I am trying to do, I eventually found Parse which is an awesome tool that handles all the server backend for me and is free at the basic level.
Google APIs objective-C client library doesn't support service (application-owned) accounts, because they are supposed to be used by a server-side apps, instead of clients -- you shouldn't be distributing your private key as a part of an app.
If you would like to distribute content from a service account, maybe you should write a server leg to do the authentication and pass clients credentials in a secure way for them to talk to the API on the behalf of the service account. Or, use Web publishing to make documents universally accessible without authorization and authentication if privacy is not a concern.

Retrieve facebook data in backend service

I'm currently working on an app (iOS 6) where the user will be signing in using their facebook account.
In regards to this I have a few questions:
a) Since the app asks the user for permission to access cetain data (like: basic profile info, friend list, access to post to wall etc), I assume that the app based on it's app id will be somehow authenticated to access this information as long as the user doesn't restrict access through their facebook account.
b) will it be possible for example via a service application to authenticate with the same app id as the mobile app, and hence be able to collect data from the facebook users who authenticated with the app?
The purpose of my question is, that I would like do some analysis on the users using the iphone app, but I don't want the app to first download the information from facebook, and then pass it on to my service for analysis.
If the above is possible, could anyone please guide me in the direction of what it is that I need to do? Perhaps links to tutorials that describes this setup, og simply tell me the right facebook terminology that I'm looking for to achive this.
Thanks in advance!
It's a bit late and you may have already picked a service. I have been using Parse.com
(tutorial site). They're very good. They have SDKs and sample code for many platforms a RESTful service for others.
They have recently been acquired by FaceBook, and already have strong links to Facebook's SDK.

iOS: Parse framework & Facebook OpenGraph

Has anyone out there integrated Facebook OpenGraph in to your iOS app using the Parse (www.parse.com) framework as your backend?
My goal is simply to post images to Facebook from my iPhone app using OpenGraph. From what I can tell, FB will not host the photos themselves - surprisingly - so I'm on the assumption I need my own backend (or Parse's in this case). (If I'm misunderstanding this, please correct me!)
I've spent most of the last day experimenting with the Facebook framework, and I plan to use Parse for much of my web services in the app, so ideally I would leverage both together and NOT introduce a separate backend/webservice (e.g. Heroku/Rails) just for simple image hosting.
..but either way I fear could get lost down a deep hole trying to implement something that will never work - web tech is not my strong suit.
I actually got this answered at a Parse.com company event here in SF, and since then have also learned A LOT about Facebook integration and posting.
The long story short is: Parse.com cannot serve as the only object in your web stack if you want to post Facebook Open Graph Stories.
In addition to simply hosting an image, Facebook Open Graph Stories require two things:
A public HTML page that Facebook's servers can reach. This page serves Facebook meta data that Facebook uses to determine how to present your image object.
A click-through link to a landing page that contains your image object.
I ended up using a Tumblr blog to host my photos, because you can 'hack' their Themes to include your own HTML headers that support FB OG Stories. It's not perfect, but for a guy without a web stack, it gets the job done!

How do I submit my Facebook graph api action for approval?

I have a mobile phone app, supporting web site and a Facebook account
When certain actions are taken on my phone app I interact with my web server. My web server then posts some info to a page on MY Facebook account.
I chose to use the graph api to achieve the posts to my Facebook page but I can see no way of complying with Facebooks requirements for submission.
When I try to submit facebook states the following
No Aggregations created for this Action Type. Please create a
completed Aggregation populated with sample data before submitting for
review.
Firstly I have no idea what an aggregation is?
Then the docs state
Review your Action Type before submitting for approval. Make sure your
definition is complete and your app is testable end-to-end for
publishing actions of this Action Type
Which makes sense but how do I get my mobile app to Facebook staff so they can test?
I should add that all works fine in development mode
If you are trying to create an action via the Facebook Open Graph Beta, you should first look into the documentation here. There you will find all information on actions, objects and aggregations you can generate on the timeline.
Further you will have to go to the subsection Open Graph of your App Settings:
https://developers.facebook.com/apps/YOUR_APP_ID/opengraph and create your aggregations populated with sample data.
If you want to make a simple post though, then use the Graph API and POST a Post object to the feed connection of the User object. There are a lot of examples and tutorials on the web and a lot of questions on that matter here on stackoverflow.

Resources