-
Notifications
You must be signed in to change notification settings - Fork 370
Description
Hello,
I recently altered SHKFacebook to use the new FBConnect interface. In short, it supports the new style of authentication where the user gets swapped to either the native facebook app (if installed) or m.facebook.com.
Altered files
- SHKConfig.h (replacing the existing facebook API settings with the lone SHKFacebookAppID).
- SHKFacebook.h
- SHKFacebook.m
- The entire FBConnect directory
Removed files
- SHKFBStreamDialog.h (the new Facebook object has a built-in dialog method, which makes subclassing to set the default message problematic, though setting the message is likely possible)
- SHKFBStreamDialog.m
Also, (unfortunately) the app delegate needs to handle incoming URL's (which is fairly trivial, but it adds an installation step) so that it can propagate the authentication. In my app, I delegated directly to a new class method of SHKFacebook, but I could also imagine a general SHK solution being implemented, as this might be a new model going forward (?).
The accessToken and expirationDate are serialized to NSUserDefaults, so the user does not have to repeatedly authorize the FB app (whether this is safe is worth considering, though it seems only slightly less safe than storing confidential values in the executable). Finally, the SHKItem is also serialized, so that the user can immediately continue posting the item following the external authentication. I imagine these changes could also lend to the efforts of offline sharing for FB.
Is there any interest in these changes? I made the effort after running into problems using the original code.
Cheers!
Andrew