How do I \"like\" a page using the new Facebook iOS SDK? (http://github.com/facebook/facebook-ios-sdk)
I\'m currently attempting to do it with:
NSMut
This is not a bug, it's broken by design. Using Facebook API you are only allowed to liking posts (by sending post request to https://graph.facebook.com/POST_ID/likes&auth_token=...), nothing else. Right now there is only one application which is allowed to liking pages using facebook api, it's "causes".
1)Use the facebook iOS SDk to check if the user is logged in.
2)Once the user is logged in, load the facebook Like API into a webview.
See http://developers.facebook.com/docs/reference/plugins/like/#
You should load something like this (format with appropiate params where you see %@, %i):
http://www.facebook.com/plugins/like.php?href=%@&layout=%@&show_faces=%@&width=%i&action=%@&colorscheme=%@&font=%@"
3)Profit.
Also, the reason the user won't have to login is because a cookie will be saved once they log in using the Facebook iOS SDK login screen (If you are doing it in your app and not Safari/FB app).
It looks like it's a well known, but unconfirmed, bug: http://bugs.developers.facebook.net/show_bug.cgi?id=10714.
It may help if you voted for the bug in Facebook's bug tracker.
Partial solutions have been suggested, though the user experience is only great if the user is already logged in to FB -- this may be likely for many but not all users, so it remains an imperfect approach.
http://angelolloqui.blogspot.com/2010/11/facebook-like-button-on-ios.html