How to add a facebook like page functionality in iphone app?

删除回忆录丶 提交于 2019-12-06 11:20:03

问题


I have to add "Facebook Like page" functionality in an iPhone app could any body 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?


回答1:


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/



来源:https://stackoverflow.com/questions/12388793/how-to-add-a-facebook-like-page-functionality-in-iphone-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!