Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook iOS SDK too slow

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

New FB iOS SDK Activity Monitor

Old Facebook Connect

Old FB Connect

like image 756
Santthosh Avatar asked Nov 06 '22 09:11

Santthosh


1 Answers

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.

like image 200
eonil Avatar answered Nov 12 '22 12:11

eonil