iosfacebookfacebook-like

How to add a Facebook like page functionality in iPhone app?


I have to add "Facebook Like page" functionality in an iPhone app could anybody help me how do it. I have searched for it but didn't find any API for iOS.

In my app I have to give a like page option to users. Users will like our page and then they will get full access of other contents of our application.

How can I know that user have liked our page or not?


Solution

  • First see my answer here - How to share or post by mail, twitter and facebook from the current application?

    Here you can learn how to post comment, Image on Facebook. There is a sample code also, Download and try it.

    Now come to your point how to make a like button. So for this Facebook has provided a POST method through which you can send a request for like any object.

    This is the method of like where 313449204401 is ID of object - https://graph.facebook.com/313449204401/likes

    For sending request you will have also need an access token. How to get an access token you can know by sample code.

    For more Read FBGraph API methods here - https://developers.facebook.com/docs/reference/api/