Facebook iOS SDK too slow - iphone

I have recently wired up my application to use the Facebook iOS SDK (http://github.com/facebook/facebook-ios-sdk). The integration works fine, but the pages loads really slow. It takes really a long time to load the login screen. Login action takes more than 10-60 seconds.
I didn't have this problem with Facebook Connect. Am I missing something? Is there a way to optimize this?
Update
I did scan the activity through HTTP Scoop over Wi-Fi which revealed something interesting, there are some .js and .css files that are taking a lot of time in the new Facebook iOS SDK (login.php, ar7ed2ft.css, 4wj242ne.js, abl6sgyy.js,) where as the old one was zippy. How to let Facebook know about it?
New Facebook iOS SDK
Old Facebook Connect

Implement OAuth 2.0 yourself. It just uses HTTPS, extremely easy to implement. In my experience, it was easier than using their confusing, document-less SDK. Important is getting authentication token. You can access all their graphs with it.
If you implement it yourself, you can choose login screen dialog design as one of:
touch
WAP
WAP is uglier because it's for older phones, but if you really need it, it may help you.

Try using this one http://github.com/facebook/facebook-iphone-sdk

Related

Is using FB JavaScript SDK the most reliable option?

We use FB JavaScript SDK and we're loading it asynchronously, according to their docs:
https://developers.facebook.com/docs/reference/javascript/
We use it to handle the login and for some basic calls to their API (mostly to publish stories and share links):
https://developers.facebook.com/docs/reference/javascript/FB.login/
https://developers.facebook.com/docs/reference/javascript/FB.api/
Since we started using it, we have experienced different issues on some browsers and devices.
As an example, yesterday we experienced problems trying to post on the user's feed from an iOS device (FB.api('/me/feed', 'post'...)), this problem lasted several hours. Earlier, we experienced problems in other platforms such as IE.
It seems like FaceBook pushes changes to their SDK without testing properly on a wide range of devices.
My questions (not easy questions, I believe):
Have you experienced similar problems. Do you think it is reliable?
Is there any realistic alternative to it?
I've always used the JavaScript SDK and it's been fine. Sure, there are issues from time to time, but that's part of being a Facebook developer.
The only alternative I can think of would be the PHP SDK. Both should be equally reliable.

Iphone application using webview

I've created a web application using asp.net. I customized it form mobile(jQuery Mobile) .
I created an iphone application that has a web view that shows the website.
Is this will be applied by Apple to publish this application???
Regards,
Moayyad
If the only purpose of the app is showing the webview with the website, and it does absolutely nothing else, then it will most likely be rejected. However, if showing the website is just a small part of its functionality, and it does some other useful things as well, then using a webview for displaying your own website is OK, as far as I know.
Note, however, that I/we can only make assumptions and guesses. Nobody except Apple knows what exactly will happen to your app - there are numerous cases when an app was rejected for a feature which another approved app had, so there are inconsistencies in the AppStore approval policy of Apple. Don't expect anything.
I don't think so. They prefer use of HTML5 in webapp. Try to review the Apple guidelines for building web app.

Starting point for Oauth and Twitter API (for iOS development)

I would love to know where to start to understand how to integrate Twitter in my iPhone applications.
So here are a few questions:
Is it madness trying to implement anything without an Oauth library?
Which of these methods should I use to obtain an access token (I want to open safari.app and get redirected back to my application using iOS url schemes, à la Twitterific)?
Can I avoid browser based authentication with iOS 5 Twitter integration?
Hope you can help.
If you're okay with requiring iOS 5, than Twitter.framework is the best/easiest way to go. They handle OAuth and everything for you. Everything is done simply by using TWRequest. It's very simple.
If you need to support older versions of iOS, than you should take a look at MGTwitterEngine. I believe that there are some forks of it on github that incorporate OAuth.
But with that being said, I highly recommend that you just target iOS 5 and forget iOS 4. It will make implementing Twitter much easier. If you need convincing, check out Matt Gemmell's blog post about why it's okay to only support the latest operating system: http://mattgemmell.com/2011/12/05/latest-version/
EDIT: And yes, Twitter.framework handles authentication for you. No need to use the browser. But users will need to add their Twitter accounts in the Settings app beforehand. If you want them to be able to add accounts through your app, then I believe you need to handle authentication yourself.

facebook application test

How can one quickly test facebook application. At the moment I am doing javascript changes and I have to upload every small change on server and refresh it. The application uses FBML.
Thanks in advance
First of all, try Rell for all your JavaScript needs.
Secondly, As FBML goes, I'd try opening a test page and using Static FBML.
As far as I'm concerned, I don't think there is a any way of integrating the two. However, you should check out the Tools page for some more helpful developer tools.

iPhone app that access the Core Location framework over web

I was wondering if I could access the iPhones Core Location framework over a website?
My goal is to build a webapp/website that the iPhone would browse to, then upload its current GPS location. This would be a simple site primary for friends/family so we could locate each other. I can have them manually enter lng/lat but its not the easiest thing to find. If the iPhone could display or upload this automatically it would be great.
I don't own a Mac yet (waiting for the new Mac Book Pro) but would like something a little more automatic right now. Once I have the mac I could download the SDK and build a better version later. For now a webapp version would be great if possible. Thanks.
Why not simply use W3C GeoLocation API available in mobile Safari? This will work on ipod touch as well (suburb precision).
It's literally 10 lines of code and the javascript will work without change on Firefox 3.5. Far easier than scrape some third party website.
http://www.instamapper.com/iphone
iPhone App store
While this may not directly answer your question, there are quite a few iPhone apps that already do this kind of thing with GPS. Instamapper is the first one I pulled up from the app store, but I'm sure you could find something to fit your needs.
I'm pretty sure you can't do what you want directly.
The best idea I can come up with is to "reuse" an iPhone app that records location and makes it accessible on the web. Take Twitter for example. If I'm not mistaken, Tapulous' app Twinkle will grab your location and post it to your Twitter.com user profile. Here's an example of what that looks like:
From your webapp, you could then scrape the user page for each person whose location you're interested in. It's a pain in the butt, but like I said, this is the best I could come up with.
Again, if you don't want to mess with Twitter, there may be other apps out there that do this as well, but I don't personally know of any. Good luck.
We built a really thin iphone client app that simply calls a predefined .js file on our site. Works like a charm.
See arisgames.org for the project.