[TIMOB-10422] iOS: Update Facebook API to 3.1
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-02-08T18:37:53.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Release 3.1.0, 2013 Sprint 03 API, 2013 Sprint 03 |
Components | iOS |
Labels | KitchenSink, api, ios, qe-testadded |
Reporter | Blain Hamon |
Assignee | Blain Hamon |
Created | 2012-08-13T11:38:48.000+0000 |
Updated | 2013-10-23T23:15:32.000+0000 |
Description
Facebook recently updated their API for iOS to 3.0. This is an opportunity to form an umbrella of improvements that this change provides. Possible subtasks to include are:
It's good to keep in mind here that iOS6 Final will be out in about 12 days, so we could start this module already thinking towards the new Social Framework, so we can get no only native Facebook iOS integration but also Twitter and Weibo, providing Ti users a free, native way to login and post using those social networks. Ref: https://developer.apple.com/library/prerelease/ios/#documentation/Social/Reference/SLRequest_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40012234 It's good to remember that more than 50% of iOS users tends to update their software in a regular basis, so we can expect to have more than 150 million users worldwide running iOS 6 in one month from now. I think it worth the shot. For pre-iOS6 and Android, I think we should go with plain FB SDK and update it to 3.0 in order to leverage new opengraph stuff.
+1
+1 for immediate Facebook 3 API and iOS 6 support!
starting today Facebook announced SDK 3.1 with iOS 6 support...... https://developers.facebook.com/blog/post/2012/09/25/facebook-sdk-for-ios-and-the-ios-6-facebook-integration/
+1. One of the main features I am looking forward to is Facebook install tracking on 3.1. The function they specifically reference is: [FBSettings publishInstall:appId];
new Facebook API 3.0 for Android as well! same feature set as iOS. needed for parity. http://developers.facebook.com/blog/post/2012/10/18/facebook-sdk-3-0-beta-for-android/
Yeah, actually we may need to go with FB API 3.1 for iOS and 3.0 for Android, this doesn't break parity since they are the latest versions for both platforms and iOS has some extra stuff on the API (for the native integration). Facebook Apps Dev Admin Interface already started bitching about using an old API with my Titanium made apps.
Saw that Ygor, funny how they also have the Learn More and Download Now urls switched, so clicking Learn More downloads the SDK. I wonder if that was on purpose haha. Having the ability to publishInstall for both iPhone and Android would be awesome. I spoke with their Ad Team and I think their option for targeting Cost Per Install might actually make their ads useful.
The story so far: The first step is to determine the feasibility of moving Facebook to its own module (In hopes that other modules follow suit for improved compile time and modularity.)
There is an area in the Ti_mobile repo (support/module/packaged) for module zips to be included with an SDK
The Ti.cloudpush targets only Android. This means our Ti.Facebook can be iOS-only and not negatively impact Android and MW.
Ti.Cloudpush's repository is separate. This could be either good or bad, depending.
Would Ti.Facebook's spinoff have any implications for developers and for internal testing? Do we need to update KS and the like to make this link? (Investigate what CLI and the like do)
The other issue is a question of added functionalityThe minimal requirement for 'updating' is to move the new Facebook .m and .h files in, ensure method names haven't changed too much, and only expose what already was exposed. No new views, no new methods, no opengraph, no new functionality. This was the primary intent of this ticket, in terms of short term.
_However_, it sounds like there's a call to expose this added functionality. This adds to the complexity significantly, because now there's issues of parity, design, and understanding all the added features.
So, what would be useful, from a community standpoint? "Add All the Things" doesn't help, but in terms of priority? The other option is to get this out the door with the minimal requirement, make sure the module is open source, and let community improve it through pulls directly.From my point of view and needs, only upgrading to the new version isn't sufficient. I would say that adding support for iOS6 FB integration & SSO is important, facebook own built in views is important, specially the one that allows you to pick a friend from a list. The the most important issue (!) is session extend (since now it is only valid for 24 hours!) https://developers.facebook.com/docs/tutorials/legacy-ios-sdk-tutorial/#extend_token https://developers.facebook.com/docs/mobile/android/build/#extend_token the rest can be prioritised lower, at least for me..
I second that Session Extend is most important, followed by iOS6 integration. SSO works with the current setup and should (must) also be ported.
I've looked in the FB SDK source, and they give us iOS6 integration for free (IE, when we request permissions, it checks to see if we're already logged in via iOS 6) so that will be in. I did have a previous abortive attempt to extend the session with 2.1.X, but the problem is that, in the specs, it says that the session is extended to 90 days, and in the code it does an extension right after login, making testing without a time machine unfeasible. Revoking an app's rights before that 90 days for testing didn't work either, because you can't extend after revoking. I will implement the extend if needed on foregrounding and major time pass so you get it for free. It's probably not likely that the new views will make it into 3.0.0. That'd require parity talks with Android and it's very close to shiptime. Tell ya what: I'll dupe-make a ticket to address views so that there's still something to track and push for, while being able to get the iOS 6 and session extension in 3.0.0.
Sounds great Blain. Did you happen to see how difficult it would be to add the "publishInstall" method from FBSettings.m?
@Blain Awesome man! Great strategy for 3.0.0 / 3.1.x
Okay, I've got a rough prototype working, and it's got something called shouldAutoPublishInstall which is on by default. That is, you get publishInstall for free. Is that sufficient, or do you want to be able to manually turn off publishInstall? The other thing is that because of how Facebook works, forceDialog (for having the login dialog as a webview) being true will override iOS6's signon. Otherwise, iOS6's integration will be used when possible. One possible side effect, and I'll see if this is an important impact or not, is that this might require Ti 3.0 to require iOS 6SDK for building (it's backwards compatible, but requires the iOS 6 libs for weak linking to them).
@Blain - shouldAutoPublishInstall turned on by default works for perfect for me.
Just an update. The files are integrated in, even as an external module, force dialog is re-enabled and works. The problem is when you try to request, through the same channels, to use iOS 6, things break down. It suddenly claims using 'publish_stream' is invalid. With it disabled, it's generating hwaes errors. So two steps forward, one step back.
can we get an update on that please ? it's been over a month since the last one. is this part of the new Ti SDK 3 ? is this for android too ? facebook just took the new Android SDK 3 out of beta http://developers.facebook.com/blog/post/2012/12/13/facebook-sdk-3-0-for-android-and-native-login/
I noticed this is marked for 3.1.0 which says it is due 12/30. Do you think that is still possible? I'm itching to use the Facebook Ads "cost per install" target and need the "publishInstall" method available for that.
we badly need session extending, it is been available from facebook from months and our app loses session and requires the user to re-authenticate with facebook manually every few hours, this is really a deal-breaker for most app users.. we need it in version 3.0
is there any estimation about delivery new FB api?
any ETA? we need to use Facebook Ads "cost per install" and session extending is a must
So not going to make it in the 12/30 release?
Also looking to see an update on this
Any updates?
For us, the latest FB SDK with native login on iOS6 is critical as it lowers the barrier for user registration.
PR https://github.com/appcelerator/titanium_mobile/pull/3783 modules PR https://github.com/appcelerator/titanium_modules/pull/65
guys, is there a parallel Android ticket for this? it has the same issues and same new Facebook SDK
@Vishai thanks, is Facebook update for Android also planned for 3.1? BTW, when is 3.1 planned to? I could never figure out how to see the expected release date here.
@Moshe. 3.1 is tentatively planned for mid-April.
@Moshe. Android update is also planned for 3.1
@Ingo @Vishai thanks
@marten With regards to iOS 6, please read [the updated documentation](https://github.com/appcelerator/titanium_mobile/blob/master/apidoc/Titanium/Facebook/Facebook.yml) on what you'll need to do. Basically, for iOS 6 support, there's quite a few changes you have to make (Request read-only permissions for logging in, reauthorize to write permissions when posting, associate your Facebook App ID with your app bundle on FB's servers). Reauthorization is going to be a new function in 3.1, so you can't do it just yet, but just a heads up. Also, with 3.1, you will have to ask for the module by name (IE, in your tiapp.xml, add it as a module) And yes, the new module detects if iOS 6 will reject your auth request due to readwrite permissions, and if that would happen, we fall back to using the old authentications provided by FB 3.1 and log why it did so. The new module also automatically attempts a session extend on login and whenever the app has been dormant for a while.
Module has been accepted. CR and FR passed.
great news! can we use facebook ad campaign that measures installs via their ads with Ti-3.1?
Tested and confirmed that module has been accepted. Titanium Studio, build: 3.1.0.201303182358 Titanium SDK, build: 3.1.0.v20130320123256 KitchenSink master branch Devices: Nexus4 Android version 4.2 iPhone5 iOS 6.1.3
Is there a ticket for FB API 3.2 ??? Facebook is already on 3.2.1 as noticed on their website, the advantages are: Better Mobile Analytics Enhanced Error Handling Improved Web Dialog Support API Improvements (including modifications on how tokens are handled). https://developers.facebook.com/ios/features/whats-new-ios-sdk-3.2/ Do you think it will be easy to update just the sdk or do we need massive changes on Ti side / mapping new stuff?
Facebook's publishinstall feature will be available or not? I would love to pay ads to facebook for installs...
If I would like to test this. How can I require the new Facebook module?
If I would like to test this. How can I require the new Facebook module?
Hey guys, yesterday Facebook announced several new features (some which require just updating the SDK). Do you guys have a new ticket for FB API 3.5 or should I open it? Faster Login Dialog and Native Sharing with Graph Objects is a must for any developer really serious about FB integration... take a look: https://developers.facebook.com/blog/post/2013/04/18/next-evolution-of-facebook-platform-for-mobile/
also, I think Appcelerator definitively must be listed as a oficial Facebook Integration Partner (as Corona, Kinvey, Parse, Phonegap, etc...) already are. The Titanium community is much larger than the community of those frameworks and we surely deserve some Facebook love. Only Appcelerator can make this happen, so, check this also too: https://developers.facebook.com/docs/facebook-technology-partners/