Tuesday, April 10, 2012

Like button in iOS application

Does anybody know how to place Facebook "like" button into iOS application? I've tried the method described in this blog post . But I do not really like this method, because its ugly Login dialog. And, what is more important, it makes user login twice. For example, user wants post a message to his wall if he isn't logged in I call standard FBLoginDialog, after that user posted a message he may want push "like" button and he have to login again - it is really bad user experience.

How to be? How can I give user "like" feature in my iOS app?

Source: Tips4all


  1. That is actually the only way to do it. There is no special iOS like button. However, the good news is that just today Facebook announced single sign in support for mobile apps. This should remove some of the burden the user faces to log in to facebook.

  2. It seems there is an agreement on not being able to do this. This question shows you can, as does the FB Graph API documentation:

    You can comment on or like any object that has a /comments or /likes
    connection by posting to https://graph.facebook.com/OBJECT_ID/comments
    and https://graph.facebook.com/OBJECT_ID/likes, respectively.

    Unfortunately, according to this question you can’t like a page.

  3. I like using ShareKit: http://www.getsharekit.com/

    It's not exactly what you're looking for, but still...

  4. The only way supported by Facebook on any platform (web, mobile, etc) is from their iFrame code. From iOS, that means embedding a UIWebView into your application with the iFrame code. Note that it does require them to login via Safari.